<template>
  <div class="body">
    <div class="header between">
      <div class="logo rows">
        <img src="@/assets/images/logo.png" />
        <span>网络准入控制系统</span>
      </div>
      <div class="top-control between" style="justify-content: flex-end">
        <!-- 	<a class="xiaoxi">
					<span class="iconfont icon-tongzhi"></span>
					<em>10</em>
				</a> -->
        <img
          src="@assets/images/tan.png"
          @click="
            tan_show = true;
            getfenlist();
          "
          class="tanopen"
          alt="" />

        <div class="user dropdown">
          <div
            @mouseenter="
              help_show = true;
              showzzc = true;
            "
            @mouseleave="
              help_show = false;
              showzzc = false;
            ">
            <div
              @click="
                help_show = !help_show;
                showzzc = !showzzc;
              ">
              <img src="@assets/images/help.png" class="help" alt="" />
            </div>

            <div class="helpdown" v-if="help_show">
              <!-- <div class="helpli" @mouseenter="show1=true" @mouseleave="show1=false"
								@click="showkaoqin=true">
								<img src="@assets/images/5ed.png" v-if="show1" alt="">
								<img src="@assets/images/5.png" v-else alt="">
								<div>考勤管理</div>
							</div>
							<div class="helpli" @mouseenter="show2=true" @mouseleave="show2=false"
								@click="showzhiban=true">
								<img src="@assets/images/2ed.png" v-if="show2" alt="">
								<img src="@assets/images/2.png" v-else alt="">
								<div>值班管理</div>
							</div> -->
              <router-link
                to=""
                @click.native="gohelp(item.id, item.helpType, item.iconEd, index)"
                class="helpli"
                @mouseenter.native="hide(index)"
                v-for="(item, index) in helptype"
                @mouseleave.native="hide(index)">
                <img :src="$url + item.icon" v-if="item.show" alt="" />
                <img :src="$url + item.iconEd" v-else alt="" />
                <div>{{ item.helpType }}</div>
              </router-link>
            </div>
          </div>

          <!-- @click="down_show=!down_show;showzzc=!showzzc" -->
          <div
            @mouseenter="
              down_show = true;
              showzzc = true;
            "
            @mouseleave="
              down_show = false;
              showzzc = false;
            ">
            <div
              class="dropdown-toggle rows"
              data-toggle="dropdown"
              @click="
                down_show = !down_show;
                showzzc = !showzzc;
              ">
              <span class="iconfont icon-yonghu"></span>
              {{ uname }}
              <span class="iconfont icon-sjx"></span>
            </div>
            <div
              class="dropdown-menu"
              aria-labelledby="dropdownMenu1"
              style="display: block; z-index: 201; top: 30px; margin-top: 0"
              v-if="down_show">
              <div
                class="user_top"
                @click.stop="
                  alert_show_user = true;
                  gettype();
                ">
                <span class="iconfont icon-yonghu"></span>
                <h2>{{ uname }}</h2>
                <p>部门：{{ departName }}</p>
                <img
                  src="@/assets/images/ding.png"
                  v-if="bind && !qywx"
                  @click.stop="showbind2 = true"
                  class="dingimg"
                  alt="" />
                <!-- v-if="bind && qywx" -->
                <img
                  src="@/assets/images/qywx.png"
                  v-if="bind && qywx"
                  @click.stop="showbind2 = true"
                  class="dingimg"
                  alt="" />
              </div>
              <!-- 	<div class="user_body">
			<p>已有空间：<strong>5/100G</strong></p>
		</div> -->
              <div class="user_bot between">
                <a href="javascript:;" @click="alert_show_pass = true">修改密码</a>
                <a href="javascript:;" @click="outlogin">
                  <span class="iconfont icon-tuichu"></span>
                  注销登录
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="box-body">
      <div
        class="zzc"
        v-if="showzzc"
        @click="close"
        style="top: 0; left: 0; z-index: 200; pointer-events: none"></div>
      <el-dialog
        title="考勤管理"
        :visible.sync="showkaoqin"
        width="500px"
        :modal-append-to-body="false"
        style="margin-top: 12vh">
        <el-table :data="kaoqin">
          <el-table-column property="name" label="姓名" align="center"></el-table-column>
          <el-table-column property="time" label="考勤时间" align="center"></el-table-column>
          <el-table-column property="late" label="是否迟到" align="center"></el-table-column>
        </el-table>
      </el-dialog>
      <el-dialog
        title="值班管理"
        :visible.sync="showzhiban"
        width="500px"
        :modal-append-to-body="false"
        style="margin-top: 12vh">
        <el-table :data="zhiban">
          <el-table-column property="name" label="人员" align="center"></el-table-column>
          <el-table-column property="date" label="日期" align="center"></el-table-column>
          <el-table-column property="zhiban" label="是否值班" align="center"></el-table-column>
        </el-table>
      </el-dialog>
      <!--选择常用语-->
      <div
        :class="phraseshow ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="phraseshow ? 'display: block;z-index:500;' : 'z-index:500;'">
        <div
          class="cent w600"
          style="justify-content: center; width: 712px !important; margin: 50px auto">
          <div class="modal-dialog" role="document" style="width: 100%; height: 438px">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                选择常用语
                <div class="right" @click="phraseshow = false">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="padding: 15px 27px; height: 321px">
                <h2 class="tcent" v-if="phraseList.length == 0">暂时没有数据</h2>
                <div class="phras_box" v-else>
                  <div
                    class="phrase_li"
                    @click="
                      addinfo.faultDescription = item.brief;
                      phraseshow = false;
                    "
                    v-for="item in phraseList">
                    {{ item.brief }}
                  </div>
                </div>
              </div>
              <div class="modal-footer tcent">
                <button class="btn btn-primary" @click="phraseshow = false">确定</button>
                <button class="btn btn-info close_eng" @click="phraseshow = false">关闭</button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--报修人-->
      <div
        :class="user_alert ? 'modal in fade' : 'modal fade'"
        role="dialog"
        :style="
          user_alert
            ? ' align-items: center;justify-content: center;display: flex;z-index:500;'
            : 'z-index:500'
        "
        id="engineer">
        <div
          class="cent w700"
          style="height: 865px; max-width: 955px; max-height: calc(100vh - 50px)">
          <div class="modal-dialog" role="document">
            <div class="modal-content" style="overflow: visible">
              <div class="modal-header tit">
                <em></em>
                选择报修人
                <div class="right" @click="closeusertalert">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div
                class="modal-body h100"
                style="
                  overflow-x: hidden;
                  overflow-y: scroll;
                  height: 760px;
                  max-height: calc(100vh - 150px);
                ">
                <div class="left">
                  <div class="zTreeDemoBackground">
                    <ul id="treeDemo4_index" class="ztree" @select="choseroom_user"></ul>
                  </div>
                </div>
                <div class="right" style="overflow: visible">
                  <div class="search">
                    <!-- <form> -->
                    <div class="form-group" style="display: flex; padding-right: 0">
                      <input
                        class="form-control"
                        autocomplete="off"
                        @keydown.enter="getalluserlist"
                        v-model="word_user"
                        placeholder="输入关键字" />
                      <div
                        style="margin-left: 10px"
                        class="btn btn-success"
                        @click="getalluserlist">
                        <span
                          class="iconfont icon-chaxun"
                          style="line-height: 34px; vertical-align: baseline"></span>
                      </div>
                    </div>
                    <!-- </form> -->
                  </div>

                  <div class="enr_alert_scorll">
                    <div style="height: 552px">
                      <h2 class="tcent" v-if="user_all.length == 0">暂时没有数据</h2>
                      <table class="table table-hover smallTab" v-else>
                        <tr>
                          <th></th>
                          <th>账号</th>
                          <th>姓名</th>
                          <th>电话</th>
                        </tr>
                        <tr v-for="(item, index) in user_all">
                          <td>
                            <input
                              type="radio"
                              v-model="userid"
                              :value="item.id"
                              @change="changechosea(item.id, item.realName, item.phoneNo)"
                              name="chose2"
                              :id="'c' + item.id" />
                            <label :for="'c' + item.id"></label>
                          </td>
                          <td>{{ item.userName }}</td>
                          <td>{{ item.realName }}</td>
                          <td>{{ item.phoneNo }}</td>
                        </tr>
                      </table>
                    </div>
                    <div class="Spage" style="margin: 20px 0">
                      <el-pagination
                        @current-change="handleCurrentChange2"
                        :current-page="page2"
                        style="display: flex; justify-content: center"
                        :pager-count="5"
                        :page-size="10"
                        layout="prev, pager, next"
                        :total="inglen2"></el-pagination>
                    </div>

                    <div class="tcent" style="margin-bottom: 30px">
                      <button class="btn btn-primary" @click="sure_user">确定</button>
                      &emsp;
                      <button class="btn btn-default" @click="closeusertalert">关闭</button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--终止工单-->
      <div
        :class="showstop ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        :style="showstop ? 'display: block;' : ''"
        id="sendOrder">
        <div class="cent" style="">
          <div class="modal-dialog modal-lg" role="document" style="margin: 0">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                <span>处理工单</span>
                <div class="right" @click="closestop">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <div class="modal-body h100 check_box stop_box">
                <div class="lc">
                  <div>
                    <div :class="orderinfo.stateId >= 1 ? 'lc_1' : 'lc_2'">
                      <img src="@/assets/images/dui2.png" alt="" />
                    </div>
                    <div class="lc_text">报修</div>
                  </div>

                  <div v-if="orderinfo.stateId == 1" class="lc_heng_ban"></div>
                  <div v-if="orderinfo.stateId == 1" class="lc_kong_ban"></div>
                  <div v-if="orderinfo.stateId >= 2" class="lc_heng"></div>

                  <div>
                    <div :class="orderinfo.stateId >= 2 ? 'lc_1' : 'lc_2'">2</div>
                    <div class="lc_text">派单</div>
                  </div>

                  <div v-if="orderinfo.stateId <= 1" class="lc_kong"></div>
                  <div v-if="orderinfo.stateId == 2" class="lc_heng_ban"></div>
                  <div v-if="orderinfo.stateId == 2" class="lc_kong_ban"></div>
                  <div v-if="orderinfo.stateId >= 3" class="lc_heng"></div>

                  <div>
                    <div :class="orderinfo.stateId >= 3 ? 'lc_1' : 'lc_2'">3</div>
                    <div class="lc_text">处理</div>
                  </div>

                  <div v-if="orderinfo.stateId <= 2" class="lc_kong"></div>
                  <div v-if="orderinfo.stateId == 3" class="lc_heng_ban"></div>
                  <div v-if="orderinfo.stateId == 3" class="lc_kong_ban"></div>
                  <div v-if="orderinfo.stateId >= 4" class="lc_heng"></div>

                  <div>
                    <div :class="orderinfo.stateId >= 4 ? 'lc_1' : 'lc_2'">4</div>
                    <div class="lc_text">评价审核</div>
                  </div>

                  <div v-if="orderinfo.stateId <= 3" class="lc_kong"></div>
                  <div v-if="orderinfo.stateId == 4" class="lc_heng_ban"></div>
                  <div v-if="orderinfo.stateId == 4" class="lc_kong_ban"></div>
                  <div v-if="orderinfo.stateId >= 5" class="lc_heng"></div>

                  <div>
                    <div :class="orderinfo.stateId >= 5 ? 'lc_1' : 'lc_2'">5</div>
                    <div class="lc_text">完成</div>
                  </div>
                </div>

                <div class="check_alert_box" style="height: calc(100vh - 384px)">
                  <div class="check_alert_left">
                    <h3 class="tit" style="justify-content: space-between">
                      工单处理
                      <!-- <div class="time_tip">响应耗时:0秒,处理耗时:19天5小时,总耗时:19天5小时</div> -->
                    </h3>
                    <div class="check_list">
                      <!-- 工单处理 -->
                      <div v-if="alerttype == 'do'">
                        <div class="order_tab">
                          <div
                            :class="order_tab == 0 ? 'order_tab1 order_tab_act' : 'order_tab1'"
                            @click="order_tab = 0">
                            <img src="@assets/images/selected.png" v-if="order_tab == 0" alt="" />
                            <img src="@assets/images/select.png" v-if="order_tab == 1" alt="" />
                            <label for="order_tab1" class="res_text">处理完成工单结束</label>
                          </div>
                          <div
                            :class="order_tab == 1 ? 'order_tab1 order_tab_act' : 'order_tab1'"
                            @click="order_tab = 1">
                            <img src="@assets/images/selected.png" v-if="order_tab == 1" alt="" />
                            <img src="@assets/images/select.png" v-if="order_tab == 0" alt="" />
                            <label for="order_tab2" class="res_text">未处理完，以后再处理</label>
                          </div>
                        </div>

                        <div class="otleft" v-if="order_tab == 0">
                          <div class="check_lis res">
                            <div class="check_li_l">故障分类:</div>
                            <div class="input-cont">
                              <el-autocomplete
                                class="inline-input"
                                v-model="faultTypename"
                                @change="
                                  info2.faultTypeId = '';
                                  isclick3 = false;
                                "
                                value-key="name"
                                :fetch-suggestions="querySearch"
                                placeholder="支持五笔、拼音、名字搜索，右侧按钮选择"
                                @select="handleSelect"></el-autocomplete>
                              <span
                                class="iconfont icon-list"
                                @click="alert_show2 = !alert_show2"></span>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">故障原因:</div>
                            <div class="input-cont">
                              <el-autocomplete
                                class="inline-input"
                                v-model="faultCausename"
                                @change="
                                  info2.faultCauseId = '';
                                  isclick4 = false;
                                "
                                value-key="name"
                                :fetch-suggestions="querySearch2"
                                placeholder="支持五笔、拼音、名字搜索，右侧按钮选择"
                                @select="handleSelect2"></el-autocomplete>
                              <span
                                class="iconfont icon-list"
                                @click="alert_show3 = !alert_show3"></span>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">设备状态:</div>
                            <div class="radio">
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.deviceState"
                                  name="stop_status"
                                  value="1"
                                  id="stop_status1" />
                                <label for="stop_status1"></label>
                                <label for="stop_status1" class="res_text">工作正常</label>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.deviceState"
                                  name="stop_status"
                                  value="2"
                                  id="stop_status2" />
                                <label for="stop_status2"></label>
                                <label for="stop_status2" class="res_text">基本正常</label>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.deviceState"
                                  name="stop_status"
                                  value="3"
                                  id="stop_status3" />
                                <label for="stop_status3"></label>
                                <label for="stop_status3" class="res_text">建议报废</label>
                              </div>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">解决方式:</div>
                            <div class="radio">
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.way"
                                  name="stop_type"
                                  value="1"
                                  id="stop_type1" />
                                <label for="stop_type1"></label>
                                <label for="stop_type1" class="res_text">电话</label>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.way"
                                  name="stop_type"
                                  value="2"
                                  id="stop_type2" />
                                <label for="stop_type2"></label>
                                <label for="stop_type2" class="res_text">远程</label>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.way"
                                  name="stop_type"
                                  value="3"
                                  id="stop_type3" />
                                <label for="stop_type3"></label>
                                <label for="stop_type3" class="res_text">现场</label>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  v-model="info2.way"
                                  name="stop_type"
                                  value="4"
                                  id="stop_type4" />
                                <label for="stop_type4"></label>
                                <label for="stop_type4" class="res_text">送修</label>
                              </div>
                            </div>
                          </div>

                          <div class="check_lis res">
                            <div class="check_li_l">处理过程:</div>
                            <div class="check_li_r" style="position: relative">
                              <textarea
                                name=""
                                v-model="info2.process"
                                placeholder="这里输入处理过程"
                                maxlength="500"
                                @input="changenum2"
                                style="padding-bottom: 20px"
                                id=""></textarea>
                              <div class="numslen" style="right: 18px">{{ numlen2 }}/500</div>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">事件原因:</div>
                            <div class="check_li_r">
                              <textarea
                                name=""
                                style="height: 60px; top: 5px"
                                v-model="info2.causeOf"
                                placeholder="这里输入详细的事件原因"
                                id=""></textarea>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">附件上传:</div>
                            <div class="check_li_r">
                              <el-upload
                                class="upload-demo"
                                ref="upload"
                                :headers="{ Authorization: token }"
                                :action="$url + '/file/upload'"
                                :show-file-list="false"
                                :before-upload="beforeUpload1"
                                :file-list="fileList"
                                :on-success="uploadsuc"
                                :multiple="true"
                                :auto-upload="true">
                                <div class="upload_btn">
                                  <img src="@/assets/images/upload.png" alt="" />
                                  点击上传
                                </div>
                              </el-upload>
                              <div class="upload_list">
                                <div class="up_li" v-for="(item, index) in files">
                                  <div class="file_name">
                                    <div class="file_name_left">
                                      <img src="@/assets/images/upload.png" alt="" />
                                      {{ item }}
                                    </div>
                                    <div class="file_name_right">
                                      <div class="file_check" @click="check_file(item)">查看</div>
                                      <div class="file_del" @click="del_file(index)">删除</div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>

                        <div class="otleft" v-if="order_tab == 1">
                          <div class="check_lis res">
                            <div class="check_li_l">处理过程:</div>
                            <div class="check_li_r" style="position: relative">
                              <textarea
                                name=""
                                v-model="remark"
                                placeholder="这里输入处理过程"
                                maxlength="500"
                                @input="changenum3"
                                style="padding-bottom: 20px"
                                id=""></textarea>
                              <div class="numslen" style="right: 18px">{{ numlen3 }}/500</div>
                            </div>
                          </div>
                          <div class="check_lis res">
                            <div class="check_li_l">附件上传:</div>
                            <div class="check_li_r">
                              <el-upload
                                class="upload-demo"
                                ref="upload"
                                :headers="{ Authorization: token }"
                                :action="$url + '/file/upload'"
                                :show-file-list="false"
                                :before-upload="beforeUpload2"
                                :file-list="fileList2"
                                :on-success="uploadsuc2"
                                :multiple="true"
                                :auto-upload="true">
                                <div class="upload_btn">
                                  <img src="@/assets/images/upload.png" alt="" />
                                  点击上传
                                </div>
                              </el-upload>
                              <div class="upload_list">
                                <div class="up_li" v-for="(item, index) in files2">
                                  <div class="file_name">
                                    <div class="file_name_left">
                                      <img src="@/assets/images/upload.png" alt="" />
                                      {{ item }}
                                    </div>
                                    <div class="file_name_right">
                                      <div class="file_check" @click="check_file(item)">查看</div>
                                      <div class="file_del" @click="del_file2(index)">删除</div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="stop_btn">
                      <div class="stopbtn" v-if="alerttype == 'stop'" @click="stoporder">
                        <img src="@/assets/images/stop.png" alt="" />
                        终止工单
                      </div>
                      <div class="stopbtn" v-if="alerttype == 'do'" @click="doorder">
                        <img src="@/assets/images/done.png" alt="" />
                        {{ order_tab == 0 ? '完成' : '确定' }}
                      </div>
                    </div>
                  </div>
                  <div class="check_alert_right">
                    <ul class="Smenu clear m3">
                      <li :class="type == 0 ? 'active' : ''" @click="type = 0">
                        <a href="#">工单信息</a>
                      </li>
                      <li
                        :class="type == 1 ? 'active' : ''"
                        @click="
                          type = 1;
                          audioinit(1);
                        ">
                        <a href="#">处理流程</a>
                      </li>
                    </ul>
                    <div class="Scont" v-if="type == 0">
                      <table>
                        <tr>
                          <td>报修时间：</td>
                          <td>{{ orderinfo.createDate }}</td>
                        </tr>
                        <tr>
                          <td>工单编号：</td>
                          <td>{{ orderinfo.code }}</td>
                        </tr>
                        <tr>
                          <td>报修人：</td>
                          <td>{{ orderinfo.commitUserName }}</td>
                        </tr>
                        <tr>
                          <td>报修方式：</td>
                          <td>
                            {{
                              orderinfo.repairTypeId == 3 ? '终端报修' : orderinfo.repairTypeName
                            }}
                          </td>
                        </tr>
                        <tr>
                          <td>报修人电话：</td>
                          <td>{{ orderinfo.phoneNo }}</td>
                        </tr>
                        <tr>
                          <td>报修地址：</td>
                          <td>{{ orderinfo.address }}</td>
                        </tr>
                        <tr>
                          <td>紧急程度：</td>
                          <td>
                            <div class="tip_nomorl" v-if="orderinfo.emergenceId == 1">常规处理</div>
                            <div class="tip_nomorl" v-if="orderinfo.emergenceId == 2">较紧急</div>
                            <div class="tip_nomorl" v-if="orderinfo.emergenceId == 3">非常紧急</div>
                          </td>
                        </tr>
                        <tr>
                          <td>影响范围：</td>
                          <td>
                            <div class="tip_fw">{{ orderinfo.range }}</div>
                          </td>
                        </tr>
                        <tr>
                          <td>是否重复维修：</td>
                          <td>{{ orderinfo.isRepeat ? '是' : '否' }}</td>
                        </tr>
                        <tr>
                          <td>建单人：</td>
                          <td>{{ orderinfo.createName }}</td>
                        </tr>
                        <!-- <tr>
													<td>建单时间：</td>
													<td>{{orderinfo.createDate}}</td>
												</tr> -->
                        <tr v-if="checked">
                          <td>所属系统：</td>
                          <td>{{ orderinfo.sysSonName }}</td>
                        </tr>
                        <tr>
                          <td>来源：</td>
                          <td v-if="orderinfo.sourceId == 1">电话报修</td>
                          <td v-if="orderinfo.sourceId == 2">上门报修</td>
                          <td v-if="orderinfo.sourceId == 3">补录</td>
                          <td v-if="orderinfo.sourceId == 4">微信报修</td>
                          <td v-if="orderinfo.sourceId == 5">电脑报修</td>
                        </tr>
                      </table>
                    </div>
                    <div class="Scont" v-if="type == 1">
                      <div class="time_line_box">
                        <h2 class="tcent" v-if="orderinfo.historyEntityList == null">
                          暂时没有数据
                        </h2>
                        <div class="time_line" v-else>
                          <div class="time_line_line"></div>
                          <div
                            class="time_line_li"
                            v-for="(item, index) in orderinfo.historyEntityList">
                            <div class="time_line_time">{{ item.createDate }}</div>
                            <div class="time_line_cur"></div>
                            <div class="time_line_right">
                              <div class="time_line_tip">{{ item.typeName }}</div>
                              <div class="time_line_text">
                                <span class="gre">{{ item.createName }}</span>

                                <span
                                  v-if="
                                    orderinfo.tape &&
                                    index == orderinfo.historyEntityList.length - 1
                                  ">
                                  <div class="info_vid" @click="playaud2 = !playaud2">
                                    <div class="wifi-symbol" v-if="playaud2">
                                      <div class="wifi-circle first"></div>
                                      <div class="wifi-circle second"></div>
                                      <div class="wifi-circle third"></div>
                                    </div>
                                    <img src="@/assets/images/vid.png" v-else alt="" />
                                    {{ duration }}"
                                  </div>
                                  <audio :src="$url + orderinfo.tape" ref="aud2"></audio>
                                </span>

                                <span v-if="item.expressStr">原因：{{ item.expressStr }};</span>
                                <span v-if="item.remark">
                                  <span
                                    v-if="item.typeName != '已派单' && item.typeName != '已报修'">
                                    说明：
                                  </span>
                                  {{ item.remark }};
                                </span>
                                <div
                                  style="white-space: nowrap"
                                  v-if="
                                    item.enclosure.length > 0 &&
                                    index != orderinfo.historyEntityList.length - 1
                                  ">
                                  附件：
                                </div>
                                <div
                                  class="papers"
                                  style="padding-left: 0"
                                  v-if="
                                    item.enclosure &&
                                    index != orderinfo.historyEntityList.length - 1
                                  "
                                  v-for="item2 in item.enclosure">
                                  <!-- <div @click="check_file($url+'/'+item2.url)"
																	style="width: 100%;word-break: break-all;">
																	{{item2.name}}
																</div> -->
                                  <el-image
                                    v-if="chackfile(item2.name) == 'img'"
                                    style="width: 50px; height: 50px"
                                    :src="$url + item2.url"
                                    :preview-src-list="item.enclosureList"></el-image>
                                  <div
                                    v-if="chackfile(item2.name) != 'img'"
                                    @click="check_file($url + '/' + item2.url)"
                                    style="width: 100%; word-break: break-all">
                                    {{ item2.name }}
                                  </div>
                                </div>

                                <div
                                  v-if="
                                    orderinfo.photoUrls &&
                                    index == orderinfo.historyEntityList.length - 1
                                  ">
                                  <div style="white-space: nowrap">附件：</div>
                                  <div
                                    class="papers"
                                    style="padding-left: 0"
                                    v-for="item3 in orderinfo.photoUrls">
                                    <!-- <img :src="$url+'/' +item3.url" alt=""> -->
                                    <el-image
                                      v-if="chackfile(item3.url) == 'img'"
                                      style="width: 50px; height: 50px"
                                      :src="$url + '/' + item3.url"
                                      :preview-src-list="photolist"></el-image>
                                    <div
                                      v-if="chackfile(item3.url) != 'img'"
                                      @click="check_file($url + '/' + item3.url)"
                                      style="width: 100%; word-break: break-all">
                                      {{ item3.url }}
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--派单-->
      <div
        :class="showSendOrder ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        :style="showSendOrder ? 'display: block;' : ''"
        id="sendOrder">
        <div class="cent" style="">
          <div class="modal-dialog modal-lg" role="document" style="margin: 0">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                派单
                <div class="right" @click="closeSendOrder">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <div class="modal-body h100 send_order_alert">
                <div class="sendOrder_left">
                  <div class="sendOrder_left_title">请选择工程师</div>
                  <input
                    type="text"
                    class="send_search"
                    autocomplete="off"
                    v-model="engname"
                    id=""
                    placeholder="输入拼音首字母搜索" />
                  <div class="sendLeft_box">
                    <div class="treelist" v-if="engname">
                      <div v-if="enrlist.length > 0">
                        <div
                          class="li"
                          v-for="item in enrlist"
                          @click="sear_eng(item)"
                          :style="addinfo.servicemanId == item.id ? 'color:#4286f5' : ''">
                          {{ item.realName }}
                        </div>
                      </div>
                      <h3 class="tcent" v-else>搜索不到该内容</h3>
                    </div>
                    <div
                      class="zTreeDemoBackground left"
                      :style="engname == '' ? 'display:block' : 'display:none'">
                      <ul id="treeDemo_u_index" class="ztree" @select="choseroom_eng"></ul>
                    </div>
                  </div>
                </div>
                <div class="sendOrder_right">
                  <div class="order_right_index">
                    <h2 class="tcent" v-if="list_e.length == 0">暂时没有数据</h2>
                    <table class="table table-hover" v-else>
                      <tr>
                        <th style="width: 150px; text-align: center">报修时间</th>
                        <th>报修科室</th>
                        <th>联系电话</th>
                        <th>故障描述</th>
                        <th class="tcent">状态</th>
                        <th class="tcent">操作</th>
                      </tr>
                      <tr v-for="(item, index) in list_e">
                        <td style="width: 200px">{{ item.createDate }}</td>
                        <td>
                          {{ item.departName }}
                          <span v-if="item.commitUserName">({{ item.commitUserName }})</span>
                        </td>
                        <td>
                          <img class="phone_icon" src="@/assets/images/phone.png" alt="" />
                          {{ item.phoneNo }}
                        </td>
                        <td style="">
                          <span
                            style="
                              color: #333;
                              width: 300px;
                              word-wrap: break-word;
                              display: block;
                            ">
                            {{ item.faultDescription }}
                          </span>
                        </td>
                        <td class="tcent">
                          <span class="status_blue" v-if="item.stateStr == '待接单'">
                            {{ item.stateStr }}
                          </span>
                          <span class="status_gary" v-else-if="item.stateStr == '暂停处理'">
                            {{ item.stateStr }}
                          </span>
                          <span class="status_green" v-else-if="item.stateStr == '处理中'">
                            {{ item.stateStr }}
                          </span>
                          <span class="status_org" v-else-if="item.stateStr == '未派单'">
                            {{ item.stateStr }}
                          </span>
                          <span class="status_black" v-else-if="item.stateStr == '已处理'">
                            {{ item.stateStr }}
                          </span>
                        </td>
                        <td class="tcent">
                          <a href="javascript:;" class="check" @click="check(item.id, 'send')">
                            查看
                          </a>
                        </td>
                      </tr>
                    </table>

                    <div class="page_box">
                      <el-pagination
                        @size-change="handleSizeChange_e"
                        @current-change="handleCurrentChange_e"
                        :current-page="page_e"
                        :page-sizes="[10, 30, 60, 100]"
                        :page-size="limit_e"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="inglen_e"></el-pagination>
                    </div>
                  </div>
                  <div class="order_right_btns">
                    <div class="send_order_btn" @click="send">
                      <img src="../assets/images/sendorder.png" alt="" />
                      派单
                    </div>
                    <div class="send_order_btn2" @click="increase(2)">
                      <img src="../assets/images/cel.png" alt="" />
                      取消
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--新增工单弹窗-->
      <div
        :class="showadd ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        :style="showadd ? 'display: block;z-index:203' : ''"
        id="add">
        <div class="cent" style="">
          <div class="modal-dialog modal-lg" role="document" style="margin: 0">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                新增工单
                <div class="right" @click="closeadd">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 addaler">
                <div class="row" style="display: flex">
                  <div class="add_left">
                    <h4 class="tcent" v-if="tellist.length == 0">暂时没有数据</h4>
                    <div class="add_left_box">
                      <div v-for="(item, index) in tellist">
                        <div
                          :class="left_act == index ? 'left_li left_li_act' : 'left_li'"
                          @click="changetel(index)">
                          <div class="tel_title">
                            {{ item.phoneNo }}
                            <span v-if="item.createName">({{ item.createName }})</span>
                          </div>
                          <div class="tel_time">{{ item.createDate }}</div>
                        </div>
                      </div>
                    </div>
                    <el-pagination
                      v-if="tellist.length > 0"
                      layout="prev, pager, next"
                      :total="teltotal"
                      :page-size="100"
                      @current-change="handleCurrentChange_tel"
                      :current-page="telpage"></el-pagination>
                  </div>
                  <div
                    class="col-sm-12"
                    style="
                      padding: 0 14px;
                      width: calc(100% - 200px);
                      height: calc(100vh - 165px);
                      overflow-y: scroll;
                      overflow-x: hidden;
                    "
                    ref="adds">
                    <ul class="Smenu clear">
                      <li class="active"><a href="#">基本信息</a></li>
                    </ul>
                    <div class="Scont">
                      <h3 class="tit">1.报修人信息</h3>
                      <div class="row">
                        <div class="col-sm-6">
                          <div class="form-group pl-160 pr-40">
                            <label>
                              <em class="red" v-if="zddert && zddert != 'false'">*</em>
                              报修科室：
                            </label>
                            <div class="input-cont">
                              <el-autocomplete
                                popper-class="my-autocomplete"
                                @change="
                                  addinfo.departId = '';
                                  isclick1 = false;
                                "
                                v-model="addinfo.departName"
                                value-key="name"
                                :fetch-suggestions="querySearch_d"
                                placeholder="请选择内容"
                                @select="handleSelect_d">
                                <template slot-scope="{ item }">
                                  <div class="tab_tr" :title="item.name">
                                    <div class="tab_td" style="width: 50%">
                                      {{ item.name }}
                                    </div>
                                    <div class="tab_td" style="width: 50%">
                                      {{ item.address }}
                                    </div>
                                  </div>
                                </template>
                              </el-autocomplete>
                              <span
                                class="iconfont icon-list"
                                data-toggle="modal"
                                data-target="#keshi"
                                @click="
                                  alert_show = !alert_show;
                                  getrooms();
                                "></span>
                            </div>
                          </div>
                        </div>
                        <div class="col-sm-6">
                          <div class="form-group pl-160 pr-40">
                            <label>
                              <em class="red" v-if="zdaddress && zdaddress != 'false'">*</em>
                              报修地址：
                            </label>
                            <input
                              type="text"
                              autocomplete="off"
                              class="form-control"
                              v-model="addinfo.address"
                              placeholder="请输入报修地址" />
                          </div>
                        </div>
                      </div>
                      <div class="row">
                        <div class="col-sm-6">
                          <div class="form-group pl-160 pr-40">
                            <!-- <em class="red">*</em> -->
                            <label>报修人：</label>
                            <div class="input-cont">
                              <el-autocomplete
                                popper-class="my-autocomplete"
                                v-model="addinfo.commitUserName"
                                value-key="realName"
                                :fetch-suggestions="querySearch_u"
                                placeholder="请输入内容"
                                @select="handleSelect_u"
                                :trigger-on-focus="false">
                                <template slot-scope="{ item }">
                                  <div class="tab_tr">
                                    <div class="tab_td">{{ item.userName }}</div>
                                    <div class="tab_td">{{ item.realName }}</div>
                                    <div class="tab_td">{{ item.departName }}</div>
                                    <div class="tab_td">{{ item.phoneNo }}</div>
                                  </div>
                                </template>
                              </el-autocomplete>
                              <span
                                class="iconfont icon-list"
                                @click="
                                  user_alert = true;
                                  getrooms();
                                  getalluserlist();
                                "></span>
                            </div>
                          </div>
                        </div>
                        <div class="col-sm-6">
                          <div class="form-group pl-160 pr-40">
                            <label>
                              <em class="red" v-if="zdtel && zdtel != 'false'">*</em>
                              报修电话：
                            </label>
                            <div class="input-cont" style="position: relative">
                              <input
                                type="text"
                                class="form-control"
                                v-model="addinfo.phoneNo"
                                placeholder="支持五笔、拼音、名字搜索，右侧按钮选择" />
                              <img
                                class="getimg"
                                @click="getdert(addinfo.phoneNo)"
                                src="@/assets/images/get.png"
                                alt="" />
                            </div>
                            <!-- <span class="iconfont icon-dianhua" style="right:40px"></span> -->
                            <span class="iconfont icon-add" @click="adddeptphone"></span>
                          </div>
                        </div>
                      </div>
                      <div class="row mb0">
                        <div class="col-sm-6">
                          <div class="form-group pl-160">
                            <label>是否为重复维修：</label>
                            <div class="radio">
                              <div>
                                <input
                                  type="radio"
                                  name="isRepeatadd"
                                  value="1"
                                  v-model="addinfo.isRepeat"
                                  checked
                                  id="aadd" />
                                <label for="aadd"></label>
                                <span @click="addinfo.isRepeat = 1">是</span>
                              </div>
                              <div>
                                <input
                                  type="radio"
                                  name="isRepeatadd"
                                  v-model="addinfo.isRepeat"
                                  value="0"
                                  id="badd" />
                                <label for="badd"></label>
                                <span @click="addinfo.isRepeat = 0">否</span>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <h3 class="tit">2.故障信息</h3>
                      <div class="form-group pl-160 pr-40" v-if="checked && sys_options.length > 0">
                        <label>子系统：</label>
                        <div class="input-cont">
                          <el-select
                            clearable
                            v-model="sys_value"
                            placeholder="请选择"
                            @change="selectsys"
                            value-key="id">
                            <el-option
                              v-for="item in sys_options"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"></el-option>
                          </el-select>
                        </div>
                      </div>
                      <div class="form-group pl-160 pr-40">
                        <label>
                          <em class="red" v-if="zdtype && zdtype != 'false'">*</em>
                          故障分类：
                        </label>
                        <div class="input-cont">
                          <!-- readonly -->
                          <el-autocomplete
                            popper-class="my-autocomplete"
                            @change="
                              addinfo.faultTypeId = '';
                              isclick2 = false;
                            "
                            v-model="treeLoad"
                            value-key="name"
                            :fetch-suggestions="querySearch"
                            placeholder="支持五笔、拼音、名字搜索，右侧按钮选择"
                            @select="handleSelect">
                            <template slot-scope="{ item }">
                              <div style="padding-left: 20px">{{ item.treeLoad }}</div>
                            </template>
                          </el-autocomplete>
                          <!-- <i class="el-icon-circle-close close_icon" v-if="faultTypename!=''"
														@click="faultTypename='';addinfo.faultTypeId=''"></i> -->
                          <span
                            class="iconfont icon-list"
                            @click="
                              alert_show2 = true;
                              getrooms2();
                            "></span>
                        </div>
                      </div>

                      <div class="form-group pl-160 pr-40">
                        <label>说明：</label>
                        <textarea
                          class="form-control"
                          v-model="addinfo.illustrate"
                          maxlength="1000"
                          style="height: 75px; padding-bottom: 20px"
                          @input="changenum"
                          placeholder="这里输入故障信息，如：住院号，IP地址，条码号等信息"></textarea>
                        <div class="numslen">{{ numlen }}/1000</div>
                      </div>

                      <div class="form-group pl-160 pr-40">
                        <label>
                          <em class="red">*</em>
                          故障描述：
                        </label>
                        <div class="input-cont">
                          <input
                            type="text"
                            class="form-control"
                            v-model="addinfo.faultDescription"
                            maxlength="200"
                            placeholder="支持知识库引用，常用语选择，直接输入等方式" />
                          <!-- <span class="iconfont icon-list" @click="gorepo"></span> -->
                        </div>
                        <div class="biaoq">
                          <span v-for="(item, index) in phraseList" v-if="index < 5">
                            <span @click="select_con(item.brief)">{{ item.brief }}</span>
                          </span>

                          <span
                            class="iconfont icon-shenglve more"
                            @click="phraseshow = true"></span>
                        </div>
                      </div>

                      <div class="form-group pl-160 pr-40" v-if="group && group != 'false'">
                        <label>工单分组：</label>
                        <div class="input-cont">
                          <el-select clearable v-model="group_value" placeholder="请选择">
                            <el-option
                              v-for="item in group_options"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"></el-option>
                          </el-select>
                        </div>
                      </div>
                      <div class="form-group pl-160 mb0">
                        <label>来源：</label>
                        <div class="radio">
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.sourceId"
                              name="sourceIdadd"
                              value="1"
                              checked
                              id="gadd" />
                            <label for="gadd"></label>
                            <span @click="addinfo.sourceId = 1">电话报修</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.sourceId"
                              disabled
                              name="sourceIdadd"
                              value="2"
                              checked
                              id="hadd" />
                            <label for="hadd"></label>
                            <span @click="addinfo.sourceId = 1" style="color: #ccc">上门报修</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.sourceId"
                              disabled
                              name="sourceIdadd"
                              value="3"
                              checked
                              id="iadd" />
                            <label for="iadd"></label>
                            <span @click="addinfo.sourceId = 1" style="color: #ccc">补录</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.sourceId"
                              disabled
                              name="sourceIdadd"
                              value="4"
                              checked
                              id="jadd" />
                            <label for="jadd"></label>
                            <span @click="addinfo.sourceId = 1" style="color: #ccc">微信报修</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.sourceId"
                              disabled
                              name="sourceIdadd"
                              value="5"
                              checked
                              id="kadd" />
                            <label for="kadd"></label>
                            <span @click="addinfo.sourceId = 1" style="color: #ccc">电脑报修</span>
                          </div>
                        </div>
                      </div>
                      <div class="form-group pl-160 mb0">
                        <label>紧急程度：</label>
                        <div class="radio">
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.emergenceId"
                              name="emergenceIdadd"
                              value="1"
                              checked
                              id="nadd" />
                            <label for="nadd"></label>
                            <span @click="addinfo.emergenceId = 1">常规处理</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.emergenceId"
                              name="emergenceIdadd"
                              value="2"
                              checked
                              id="madd" />
                            <label for="madd"></label>
                            <span @click="addinfo.emergenceId = 2">较紧急</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.emergenceId"
                              name="emergenceIdadd"
                              value="3"
                              checked
                              id="ladd" />
                            <label for="ladd"></label>
                            <span @click="addinfo.emergenceId = 3">非常紧急</span>
                          </div>
                        </div>
                      </div>
                      <div class="form-group pl-160">
                        <label>影响范围：</label>
                        <div class="radio">
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.rangeId"
                              name="rangeIdadd"
                              value="1"
                              checked
                              id="oadd" />
                            <label for="oadd"></label>
                            <span @click="addinfo.rangeId = 1">个人事件</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.rangeId"
                              name="rangeIdadd"
                              value="2"
                              checked
                              id="padd" />
                            <label for="padd"></label>
                            <span @click="addinfo.rangeId = 2">科室事件</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.rangeId"
                              name="rangeIdadd"
                              value="3"
                              checked
                              id="qadd" />
                            <label for="qadd"></label>
                            <span @click="addinfo.rangeId = 3">多科室事件</span>
                          </div>
                          <div>
                            <input
                              type="radio"
                              v-model="addinfo.rangeId"
                              name="rangeIdadd"
                              value="4"
                              checked
                              id="radd" />
                            <label for="radd"></label>
                            <span @click="addinfo.rangeId = 4">全院事件</span>
                          </div>
                        </div>
                      </div>

                      <div class="row">
                        <div class="col-sm-12">
                          <div class="form-group pl-160 pr-40">
                            <label>故障设备：</label>
                            <div class="input-cont">
                              <input
                                type="text"
                                v-model="addinfo.faultEquipment"
                                class="form-control"
                                placeholder="请输入设备名称" />
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="form-group pl-160">
                        <label>附件上传：</label>
                        <div class="check_li_r">
                          <el-upload
                            class="upload-demo"
                            ref="upload"
                            :data="{ project: 'gd' }"
                            :headers="{ Authorization: token }"
                            :action="$url + '/file/upload'"
                            :show-file-list="false"
                            :file-list="fileList3"
                            :before-upload="beforeUpload"
                            :on-success="uploadsuc3"
                            :multiple="true"
                            :auto-upload="true">
                            <div class="upload_btn">
                              <img src="@/assets/images/upload.png" alt="" />
                              点击上传
                            </div>
                          </el-upload>
                          <div class="upload_list">
                            <div class="up_li" v-for="(item, index) in files3">
                              <div class="file_name">
                                <div class="file_name_left">
                                  <img src="@/assets/images/upload.png" alt="" />
                                  {{ item }}
                                </div>
                                <div class="file_name_right">
                                  <div class="file_check" @click="check_file($url + item)">
                                    查看
                                  </div>
                                  <div class="file_del" @click="del_file3(index)">删除</div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="modal-footer tcent">
                        <button class="btn btn-primary" @click="showData">
                          <span class="iconfont icon-add"></span>
                          创建工单
                        </button>
                        <button
                          class="btn btn-success"
                          @click="showData('1')"
                          style="margin-right: 15px">
                          <span class="iconfont icon-wode"></span>
                          由我处理
                        </button>
                        <button class="btn btn-green2" @click="showData('3')">
                          <span class="iconfont icon-dianhua"></span>
                          电话已解决
                        </button>
                        <button
                          class="btn btn-red2"
                          style="margin-left: 15px"
                          @click="sign"
                          v-if="$permissions.indexOf(103) != -1">
                          <img src="@assets/images/biaoji.png" alt="" style="width: 18px" />
                          标记电话
                        </button>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--选择科室弹窗-->
      <div
        :class="alert_show ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="alert_show ? 'display: block;' : ''">
        <div
          class="cent w600"
          style="
            justify-content: center;
            width: 600px;
            height: calc(100% - 312px);
            margin: 156px auto;
          ">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                选择科室
                <div
                  class="right"
                  @click="
                    alert_show = false;
                    roomsearch = '';
                    getallrooms();
                  ">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div
                class="modal-body h100 search-cont"
                style="height: calc(100vh - 500px); overflow-x: hidden; overflow-y: scroll">
                <div class="search">
                  <div class="form-group" style="display: flex; padding-right: 0">
                    <input
                      class="form-control"
                      autocomplete="off"
                      @keydown.enter="getallrooms"
                      placeholder="输入关键字"
                      v-model="roomsearch" />

                    <div style="margin-left: 10px" class="btn btn-success" @click="getallrooms">
                      <span
                        class="iconfont icon-chaxun"
                        style="line-height: 34px; vertical-align: baseline"></span>
                    </div>
                  </div>
                </div>
                <div class="treelist" v-if="roomsearch">
                  <div v-if="allrooms.length > 0">
                    <div class="li" v-for="item in allrooms" @click="sear_choserome(item)">
                      {{ item.name }}
                    </div>
                  </div>
                  <h2 class="tcent" v-else>搜索不到该内容</h2>
                </div>
                <div
                  class="zTreeDemoBackground left"
                  :style="roomsearch == '' ? 'display:block' : 'display:none'">
                  <ul id="treeDemo_index" class="ztree" @select="choseroom"></ul>
                </div>
              </div>
              <div class="modal-footer tcent">
                <button
                  class="btn btn-primary"
                  @click="
                    alert_show = false;
                    roomsearch = '';
                    getallrooms();
                  ">
                  确定
                </button>
                <button
                  class="btn btn-info"
                  @click="
                    alert_show = false;
                    roomsearch = '';
                    getallrooms();
                  ">
                  关闭
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--新增分组弹窗-->
      <div
        :class="alert_show_user ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="alert_show_user ? 'display: block;z-index:201' : 'z-index:201'">
        <div class="cent w600" style="justify-content: center; width: 544px; height: 550px">
          <div class="modal-dialog" role="document">
            <div class="modal-content" style="overflow: visible">
              <div
                class="zzc"
                v-if="showzzc2"
                @click="close2"
                style="top: -218px; left: calc(-50vw + 50%)"></div>
              <div class="modal-header tit">
                <em></em>
                修改用户
                <div class="right" @click="closealert">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont">
                <div class="line">
                  <div class="line_title">真实姓名：</div>
                  <input
                    type="text"
                    autocomplete="off"
                    v-model="info.realName"
                    class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">账号：</div>
                  <input
                    type="text"
                    autocomplete="off"
                    readonly
                    v-model="info.userName"
                    class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">手机号：</div>
                  <input
                    type="text"
                    autocomplete="off"
                    v-model="info.phoneNo"
                    class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">分机号：</div>
                  <input
                    type="text"
                    autocomplete="off"
                    v-model="info.extTelNum"
                    class="form-control" />
                </div>

                <div class="line">
                  <div class="line_title">所属部门：</div>
                  <div class="select_box" style="margin-left: 0">
                    <div
                      class="form-control"
                      id="select"
                      style="width: 360px"
                      @click="
                        options_show = !options_show;
                        showzzc2 = !showzzc2;
                      ">
                      <div :style="dept == '选择部门' ? 'color: #999;' : ''">{{ dept }}</div>
                      <img src="../assets/images/down.png" alt="" />
                    </div>
                    <div class="options" v-if="options_show">
                      <div class="option" style="color: #999">选择部门</div>
                      <!-- <div class="option" @click="selectit2('all')">全部</div> -->
                      <div class="option" @click="selectit(index)" v-for="(item, index) in types">
                        {{ item.name }}
                      </div>
                    </div>
                  </div>
                </div>
                <div class="line">
                  <div class="line_title">性别：</div>
                  <div class="radio">
                    <div>
                      <input
                        type="radio"
                        name="sexs"
                        value="1"
                        v-model="info.sex"
                        checked
                        id="sa" />
                      <label for="sa"></label>
                      <span @click="info.sex = 1">男</span>
                    </div>
                    <div>
                      <input type="radio" name="sexs" v-model="info.sex" value="0" id="sb" />
                      <label for="sb"></label>
                      <span @click="info.sex = 0">女</span>
                    </div>
                  </div>
                </div>
                <div class="line">
                  <div class="line_title">邮箱：</div>
                  <input type="text" autocomplete="off" v-model="info.email" class="form-control" />
                </div>
              </div>
              <div class="buttons">
                <div class="sure" @click="sure">确定</div>
                <div class="closebtn" @click="closealert">关闭</div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="alzzc" v-if="showbind">
        <div class="bindalert">
          <img src="@/assets/images/close.png" class="closebind" @click="showbind = false" alt="" />
          <div class="albind_top">
            <div class="bindtop_left">
              <img src="@/assets/images/app.png" alt="" />
              <div>阳途</div>
            </div>
            <div class="bindtop_left">
              <img v-if="qywx" src="@/assets/images/qywx.png" alt="" />
              <img v-else src="@/assets/images/ding.png" alt="" />
              <div>{{ qywx ? '企业微信' : '钉钉' }}</div>
            </div>
          </div>

          <div class="binbtn" @click="showbind3 = true">
            {{ qywx ? '点击绑定企业微信' : '点击绑定钉钉' }}
          </div>
        </div>
      </div>
      <!--故障分类弹窗-->
      <div
        :class="alert_show2 ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="alert_show2 ? 'display: block;z-index:500;' : 'z-index:500;'">
        <div class="cent w600" style="justify-content: center; width: 600px; margin: 12vh auto">
          <div class="modal-dialog" role="document">
            <div class="modal-content" style="height: 70vh">
              <div class="modal-header tit">
                <em></em>
                故障分类
                <div
                  class="right"
                  @click="
                    alert_show2 = false;
                    typesearch = '';
                    gettypetree(sysids);
                  ">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="height: calc(75vh - 168px)">
                <div class="search">
                  <div class="form-group" style="display: flex; padding-right: 0">
                    <input
                      class="form-control"
                      autocomplete="off"
                      @keydown.enter="gettypetree"
                      placeholder="输入关键字"
                      v-model="typesearch" />

                    <div
                      style="margin-left: 10px"
                      class="btn btn-success"
                      @click="gettypetree(sysids)">
                      <span
                        class="iconfont icon-chaxun"
                        style="line-height: 34px; vertical-align: baseline"></span>
                    </div>
                  </div>
                </div>
                <div class="treelist" v-if="typesearch">
                  <div v-if="typetree.length > 0">
                    <div class="li" v-for="item in typetree" @click="sear_chosetype(item)">
                      {{ item.treeLoad }}
                    </div>
                  </div>
                  <h2 class="tcent" v-else>搜索不到该内容</h2>
                </div>
                <div
                  class="zTreeDemoBackground addclass"
                  :style="typesearch == '' ? 'display:block' : 'display:none'">
                  <ul id="treeDemo2_index" class="ztree" @select="choseroom2"></ul>
                </div>
              </div>
              <div class="modal-footer tcent">
                <button
                  class="btn btn-primary"
                  @click="
                    alert_show2 = false;
                    typesearch = '';
                    gettypetree();
                  ">
                  确定
                </button>
                <button
                  class="btn btn-info"
                  @click="
                    alert_show2 = false;
                    typesearch = '';
                    gettypetree();
                  ">
                  关闭
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--故障原因弹窗-->
      <div
        :class="alert_show3 ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="alert_show3 ? 'display: block;z-index:500;' : 'z-index:500;'">
        <div class="cent w600" style="justify-content: center; width: 600px; margin: 103px auto">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                故障原因
                <div
                  class="right"
                  @click="
                    alert_show3 = false;
                    coursesearch = '';
                    getcoursetree();
                  ">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="height: calc(100vh - 400px)">
                <div class="search">
                  <div class="form-group" style="display: flex; padding-right: 0">
                    <input
                      autocomplete="off"
                      class="form-control"
                      @keydown.enter="getcoursetree"
                      placeholder="输入关键字"
                      v-model="coursesearch" />

                    <div style="margin-left: 10px" class="btn btn-success" @click="getcoursetree">
                      <span
                        class="iconfont icon-chaxun"
                        style="line-height: 34px; vertical-align: baseline"></span>
                    </div>
                  </div>
                </div>
                <div class="treelist" v-if="coursesearch">
                  <div v-if="coursetree.length > 0">
                    <div class="li" v-for="item in coursetree" @click="sear_chosecourse(item)">
                      {{ item.name }}
                    </div>
                  </div>
                  <h2 class="tcent" v-else>搜索不到该内容</h2>
                </div>
                <div
                  class="zTreeDemoBackground left"
                  :style="coursesearch == '' ? 'display:block' : 'display:none'">
                  <ul id="treeDemo3_index" class="ztree" @select="choseroom3"></ul>
                </div>
              </div>
              <div class="modal-footer tcent">
                <button
                  class="btn btn-primary"
                  @click="
                    alert_show3 = false;
                    coursesearch = '';
                    getcoursetree();
                  ">
                  确定
                </button>
                <button
                  class="btn btn-info"
                  @click="
                    alert_show3 = false;
                    coursesearch = '';
                    getcoursetree();
                  ">
                  关闭
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--标记-->
      <div class="alzzc" v-if="showbiaoji">
        <div class="del_alert bj_alert">
          <div class="modal-header tit" style="text-align: left">
            <em></em>
            标记电话
            <div class="right" @click="showbiaoji = false">
              <button
                type="button"
                class="close"
                data-dismiss="modal"
                aria-label="Close"
                style="line-height: normal">
                <span class="iconfont icon-cha" aria-hidden="true"></span>
              </button>
            </div>
          </div>
          <div class="alert_info" style="margin-top: 0">
            <div class="bjtab">
              <div class="bjtabli" @click="mark == 1 ? (mark = '') : (mark = 1)">
                <input type="radio" v-model="mark" name="mark" disabled value="1" id="mark" />
                <label for="mark"></label>
                <div :style="mark == 1 ? 'color:#4286F5' : ''">找人</div>
              </div>
              <div class="bjtabli" @click="mark == 2 ? (mark = '') : (mark = 2)">
                <input type="radio" v-model="mark" name="mark" disabled value="2" id="mark2" />
                <label for="mark2"></label>
                <div :style="mark == 2 ? 'color:#4286F5' : ''">无效</div>
              </div>
            </div>

            <div class="albjbox">
              <div class="bjallist" v-for="item in grouplist">
                <div class="gname" @click="item.show = !item.show">
                  <img
                    src="@assets/images/up.png"
                    alt=""
                    :style="item.show ? 'transform:rotate(90deg)' : 'transform:rotate(0deg)'" />
                  <div>{{ item.groupName }}</div>
                </div>
                <div class="glist" v-if="item.show">
                  <div class="empty" v-if="item.list.length == 0">暂无内容</div>
                  <div class="gli" v-else v-for="item2 in item.list">
                    <img src="@assets/images/usered.png" alt="" />
                    <div class="gtitle">{{ item2.realName }}</div>
                    <div class="gtitle">{{ item2.phoneNo }}</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="alert_btns">
            <div class="alert_sure" @click="dosign">确认</div>
            <div
              class="alert_close"
              @click="
                mark = 1;
                showbiaoji = false;
              ">
              取消
            </div>
          </div>
        </div>
      </div>

      <!--确认绑定-->
      <div class="alzzc" v-if="showbind3">
        <div class="del_alert">
          <div class="modal-header tit" style="text-align: left">
            <em></em>
            信息
            <div class="right" @click="showbind = false">
              <button
                type="button"
                class="close"
                data-dismiss="modal"
                aria-label="Close"
                style="line-height: normal">
                <span class="iconfont icon-cha" aria-hidden="true"></span>
              </button>
            </div>
          </div>
          <div class="alert_info">确定要绑定当前账号</div>
          <div class="alert_btns">
            <div class="alert_sure" @click="binddingding">确认</div>
            <div class="alert_close" @click="showbind3 = false">取消</div>
          </div>
        </div>
      </div>

      <div class="alzzc" v-if="showbind2">
        <div class="del_alert">
          <div class="modal-header tit" style="text-align: left">
            <em></em>
            信息
            <div class="right" @click="showbind2 = false">
              <button
                type="button"
                class="close"
                data-dismiss="modal"
                aria-label="Close"
                style="line-height: normal">
                <span class="iconfont icon-cha" aria-hidden="true"></span>
              </button>
            </div>
          </div>
          <div class="alert_info">确定要解除绑定</div>
          <div class="alert_btns">
            <div class="alert_sure" @click="unbind">确认</div>
            <div class="alert_close" @click="showbind2 = false">取消</div>
          </div>
        </div>
      </div>

      <!--添加分机号-->
      <div
        :class="addfen ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="addfen ? 'display: block;z-index:202' : 'z-index:202'">
        <div class="cent w600" style="justify-content: center; width: 544px; height: 330px">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                添加分机号
                <div class="right" @click="addfen = false">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="height: 200px">
                <div class="line" v-if="isPhoneGroup">
                  <div class="line_title">电话分组：</div>
                  <el-select v-model="remoteId">
                    <el-option
                      v-for="item in remoteIdarr"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"></el-option>
                  </el-select>
                </div>
                <div class="line">
                  <div class="line_title">
                    <span>*</span>
                    分机号：
                  </div>
                  <input type="text" autocomplete="off" v-model="equipnum" class="form-control" />
                </div>
                <div class="line" v-if="teltype == 2">
                  <div class="line_title">
                    <span>*</span>
                    电话：
                  </div>
                  <el-select v-model="erdai">
                    <el-option
                      v-for="item in erdaiarr"
                      :key="item.ipPort"
                      :label="item.ipPort"
                      :value="item.ipPort"></el-option>
                  </el-select>
                </div>
                <div class="line">
                  <div class="line_title">备注：</div>
                  <input type="text" autocomplete="off" v-model="extension" class="form-control" />
                </div>
              </div>
              <div class="buttons">
                <div class="sure" @click="addtel">确定</div>
                <div class="closebtn" @click="addfen = false">关闭</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--弹屏设置弹窗-->
      <div
        :class="tan_show ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="tan_show ? 'display: block;z-index:201' : 'z-index:201'">
        <div
          class="cent w600"
          style="
            justify-content: center;
            width: 900px;
            height: 696px;
            margin: calc(50vh - 367px) auto;
          ">
          <div class="modal-dialog" role="document" style="width: 900px">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                弹屏设置
                <div class="right" @click="tan_show = false">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="padding: 0 37px 43px; height: 624px">
                <div class="tanbox">
                  <div class="tan_li" v-for="(item, index) in fenlist">
                    <el-checkbox
                      v-if="$permissions.length > 0 && $permissions.indexOf(125) != -1"
                      v-model="item.chosesf"
                      @change="changechose(index)"></el-checkbox>
                    <div class="tan_li_box">
                      <div class="tan_main">
                        <div class="tan_title">
                          分机号（{{ item.equipnum }}）
                          <span class="tan_info" v-if="item.remark">备注：{{ item.remark }}</span>
                        </div>
                        <div class="tan_info">
                          当前使用人：{{ item.username }} &nbsp; 开始时间：{{ item.startTime }}
                        </div>
                        <div class="tan_info">
                          <span v-if="item.remoteEqu">
                            {{ item.remoteEqu }}
                          </span>
                          &nbsp;
                          <span v-if="item.sysSonName">
                            {{ item.sysSonName }}
                          </span>
                        </div>
                      </div>
                      <div style="display: flex">
                        <div
                          class="tan_bind"
                          @click="bindtel(index)"
                          v-if="$permissions.length > 0 && $permissions.indexOf(127) != -1">
                          绑定
                        </div>
                        <div
                          class="tan_bind2"
                          style="width: "
                          @click="unbindtel(index)"
                          v-if="$permissions.length > 0 && $permissions.indexOf(127) != -1">
                          解绑
                        </div>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="tan_btns">
                  <div
                    class="tan_btn1"
                    @click="openaddfen"
                    v-if="$permissions.length > 0 && $permissions.indexOf(123) != -1">
                    <img src="@assets/images/addfen.png" alt="" />
                    添加分机号
                  </div>
                  <div
                    class="tan_btn2"
                    @click="del"
                    v-if="$permissions.length > 0 && $permissions.indexOf(125) != -1">
                    <img src="@assets/images/del.png" alt="" />
                    删除
                  </div>
                </div>

                <div class="tan_zhu">
                  说明：
                  <br />
                  1、每条线路只允许一个人设置弹屏；
                  <br />
                  2、如果设置的线路有人设置时，会把另外一个挤下线。
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!--修改密码弹窗-->
      <div
        :class="alert_show_pass ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="alert_show_pass ? 'display: block;z-index:201' : 'z-index:201'">
        <div
          class="cent w600"
          style="
            justify-content: center;
            width: 544px;
            height: 310px;
            margin: calc(50vh - 155px) auto;
          ">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                修改密码
                <div class="right" @click="closepass">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="height: 200px">
                <div class="line">
                  <div class="line_title">
                    <span>*</span>
                    旧密码：
                  </div>
                  <input type="password" v-model="oldpass" class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">
                    <span>*</span>
                    新密码：
                  </div>
                  <input type="password" v-model="newpass" class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">
                    <span>*</span>
                    确认密码：
                  </div>
                  <input type="password" v-model="repass" class="form-control" />
                </div>
              </div>
              <div class="buttons">
                <div class="sure" @click="changepass">确定</div>
                <div class="closebtn" @click="closepass">关闭</div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div
        :class="dialogVisible ? 'modal in fade' : 'modal fade'"
        tabindex="-1"
        role="dialog"
        id="keshi"
        :style="dialogVisible ? 'display: block;z-index:204' : 'z-index:204'">
        <div
          class="cent w600"
          style="
            justify-content: center;
            width: 544px;
            height: 310px;
            margin: calc(50vh - 155px) auto;
          ">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header tit">
                <em></em>
                绑定部门
                <div class="right" @click="closepass">
                  <button
                    type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    style="line-height: normal">
                    <span class="iconfont icon-cha" aria-hidden="true"></span>
                  </button>
                </div>
              </div>
              <!--表单-->
              <div class="modal-body h100 search-cont" style="height: 160px">
                <div class="line">
                  <div class="line_title">电话：</div>
                  <input type="text" v-model="addinfo.phoneNo" class="form-control" />
                </div>
                <div class="line">
                  <div class="line_title">部门：</div>
                  <el-select v-model="deptphone" filterable placeholder="请选择">
                    <el-option
                      v-for="item in allrooms"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"></el-option>
                  </el-select>
                </div>
              </div>
              <div class="buttons">
                <div class="sure" @click="binddeptphone">确定</div>
                <div class="closebtn" @click="dialogVisible = false">关闭</div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="left-cont">
        <ul class="nav">
          <li :class="active == 1 ? 'active' : ''" @click="goit(1)">
            <router-link to="/mainCont" v-if="active == 1" @click.native="flushCom">
              <span class="iconfont icon-shouye"></span>
              首页
            </router-link>
            <router-link to="/list" v-else>
              <span class="iconfont icon-shouye"></span>
              首页
            </router-link>
          </li>
          <li :class="active == 2 ? 'active' : ''" @click="goit(2)">
            <router-link to="/substance" v-if="active == 2" @click.native="flushCom">
              <span class="iconfont icon-zichan"></span>
              全网资产
            </router-link>
            <router-link to="/substance" v-else>
              <span class="iconfont icon-zichan"></span>
              全网资产
            </router-link>
          </li>
          <li :class="active == 3 ? 'active' : ''" @click="goit(3)">
            <router-link to="/ipPool" v-if="active == 3" @click.native="flushCom">
              <span class="iconfont icon-ip"></span>
              IP地址池
            </router-link>
            <router-link to="/ipPool" v-else>
              <span class="iconfont icon-ip"></span>
              IP地址池
            </router-link>
          </li>
          <li :class="active == 4 ? 'active' : ''" @click="goit(4)">
            <router-link to="/internet" v-if="active == 4" @click.native="flushCom">
              <span class="iconfont icon-wangluo"></span>
              网络管理
            </router-link>
            <router-link to="/internet" v-else>
              <span class="iconfont icon-wangluo"></span>
              网络管理
            </router-link>
          </li>
          <li :class="active == 5 ? 'active' : ''" @click="goit(5)">
            <router-link to="/" v-if="active == 4" @click.native="flushCom">
              <span class="iconfont icon-io-output"></span>
              旁路准入
            </router-link>
            <router-link to="/internet" v-else>
              <span class="iconfont icon-io-output"></span>
              旁路准入
            </router-link>
          </li>
          <li :class="active == 6 ? 'active' : ''" @click="goit(6)">
            <router-link to="/" v-if="active == 4" @click.native="flushCom">
              <span class="iconfont icon-shujuyuanguanli"></span>
              802.1X准入
            </router-link>
            <router-link to="/" v-else>
              <span class="iconfont icon-shujuyuanguanli"></span>
              802.1X准入
            </router-link>
          </li>
        </ul>
        <div>
          <el-menu
            active-text-color="#4286F5"
            :default-active="num"
            class="el-menu-vertical-demo"
            :router="true"
            @select="changeindex"
            :unique-opened="true">
            <!-- <el-menu-item index="list">
              <div style="margin-bottom: 15px">
                <div style="height: 18px; font-size: 20px; text-align: center">
                  <span class="iconfont icon-shouye" style="font-size: 20px"></span>
                </div>
                <span slot="title">
                  <div style="text-align: center">首页</div>
                </span>
              </div>
            </el-menu-item> -->
            <el-submenu index="">
              <template slot="title">
                <span>设置</span>
              </template>
              <router-link to="/shezhi">
                <div :class="active == 1 ? 'active' : ''" style="text-align: center; color: #333">
                  扫描设置
                </div>
              </router-link>
            </el-submenu>
          </el-menu>
        </div>
      </div>
      <audio
        src="../assets/images/text2audio.mp3"
        ref="jdaud"
        controls
        style="opacity: 0; position: absolute; bottom: 0; right: -300px"></audio>
      <el-dialog
        title="接单通知"
        :visible.sync="jiedan"
        width="99%"
        :modal="false"
        style="margin-left: 70%"
        class="jd">
        <div class="jdlist">
          <!-- {{operatingSystem}} -->

          <div class="jdtop">
            <span>{{ jdinfo.createName }}</span>
            创建了一条新的工单，请及时处理
            <!-- <span> {{jdinfo.faultType}} </span> -->
            <!-- 类型的新工单 -->
            <!-- <span style="color: #999;font-size: 14px;"> {{jdinfo.createDate}}</span> -->
          </div>
          <!-- <div class="jdmodel">{{jdinfo.faultDescription}}</div>
					<div class="jdphone">
						<img src="@assets/images/li1.png" alt="">
						<div class="jd_left">联系电话：</div>
						<div class="jd_right">{{jdinfo.phone}}</div>
					</div>
					<div class="jdblo">
						请
						<span v-if="jdinfo.servicemanName">{{jdinfo.servicemanName}}</span>
						<span v-else>{{jdinfo.servicemanGroup}}</span>
						接单
					</div> -->
          <div class="jdli">
            <div class="jd_left">联系电话：</div>
            <div class="jd_right">{{ jdinfo.phone }}</div>
          </div>
          <div class="jdli">
            <div class="jd_left">报修部门：</div>
            <div class="jd_right">{{ jdinfo.deptName }}</div>
          </div>
          <div class="jdli">
            <div class="jd_left">报修地点：</div>
            <div class="jd_right">{{ jdinfo.address }}</div>
          </div>
          <div class="jdli">
            <div class="jd_left">故障分类：</div>
            <div class="jd_right">{{ jdinfo.faultType }}</div>
          </div>
          <div class="jdli">
            <div class="jd_left">故障详情：</div>
            <div class="jd_right">{{ jdinfo.faultDescription }}</div>
          </div>
          <div class="jdli">
            <div class="jd_left">负责工程师：</div>
            <div class="jd_right" v-if="jdinfo.servicemanName">{{ jdinfo.servicemanName }}</div>
            <div class="jd_right" v-else>{{ jdinfo.servicemanGroup }}</div>
          </div>
          <!-- <div class="jdli">
						<div class="jd_left">接单工程师组：</div>
						<div class="jd_right">{{jdinfo.servicemanGroup}}</div>
					</div> -->
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="takeeorder(jdinfo.id)">接单</el-button>
          <el-button @click="jiedan = false">关闭</el-button>
        </span>
      </el-dialog>
      <keep-alive>
        <router-view ref="child" v-if="$route.meta.keepAlive" />
      </keep-alive>
      <router-view ref="child" v-if="!$route.meta.keepAlive" />
    </div>
  </div>
</template>
<script type="text/babel">
import Vue from 'vue';
import Speech from 'speak-tts';
import OSInfo from '@/utils/OSInfo';
export default {
  name: '',
  data() {
    return {
      chromef: false,
      operatingSystem: null, // 操作系统
      speech: null,
      jdinfo: {},
      jiedan: false,
      showzhiban: false,
      showkaoqin: false,
      zhiban: [
        { name: '赵谦', date: '2023-10-02', zhiban: '是' },
        { name: '赵清阳', date: '2023-10-05', zhiban: '否' },
        { name: '吴浩', date: '2023-10-06', zhiban: '是' },
        { name: '张文韬', date: '2023-10-09', zhiban: '是' },
        { name: '王英男', date: '2023-10-12', zhiban: '是' }
      ],
      kaoqin: [
        { name: '赵谦', time: '08:15', late: '未迟到' },
        { name: '赵清阳', time: '08:25', late: '未迟到' },
        { name: '吴浩', time: '08:43', late: '未迟到' },
        { name: '张文韬', time: '09:05', late: '迟到' },
        { name: '王英男', time: '09:13', late: '迟到' }
      ],
      show1: false,
      show2: false,
      erdai: '',
      erdaiarr: [],
      deptphone: '',
      teltype: '',
      sysids: '',
      sys_value: '',
      group: sessionStorage.getItem('opengroup'),
      zddert: sessionStorage.getItem('dert'),
      zdaddress: sessionStorage.getItem('address'),
      zdtel: sessionStorage.getItem('tel'),
      zdtype: sessionStorage.getItem('type'),
      remoteIdarr: [],
      group_options: [],
      sys_options: [],
      group_value: '',
      remoteId: '',
      mark: 2,
      dialogVisible: false,
      checked: false,
      isPhoneGroup: false,
      showbiaoji: false,
      grouplist: [],
      isclick1: false,
      isclick3: false,
      isclick4: false,
      showadd: false,
      addfen: false,
      showone: true,
      showtwo: true,
      showstop: false,
      showthree: true,
      showfour: true,
      showloading: false,
      tan_show: false,
      qywx: false,
      bind: false,
      showbind: false,
      showbind2: false,
      help_show: false,
      showbind3: false,
      down_show: false,
      alert_show_pass: false,
      active: sessionStorage.getItem('rou') ? sessionStorage.getItem('rou') : 1,
      uname: '',
      alert_show3: false,
      alert_show2: false,
      alert_show: false,
      alert_show_user: false,
      showzzc: false,
      showzzc2: false,
      options_show: false,
      phraseshow: false,
      alerttype: '',
      user_alert: false,
      showSendOrder: false,
      dept: '选择部门',
      token: '',
      deptId: '',
      typesearch: '',
      departName: '',
      typetree: [],
      oldpass: '',
      newpass: '',
      repass: '',
      equipnum: '',
      dtime: 0,
      roomsearch: '',
      extension: '',
      word_user: '',
      username: '',
      engname: '',
      numlen2: 0,
      list_e: [],
      helptype: [],
      fenlist: [],
      info: {},
      reg: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
      faultTypename: '',
      treeLoad: '',
      servicemanId: '',
      faultCausename: '',
      coursesearch: '',
      coursetree: [],
      phraseList: [],
      tellist: [],
      fileList: [],
      fileList2: [],
      fileList3: [],
      files: [],
      files2: [],
      files3: [],
      filesid: [],
      files2id: [],
      files3id: [],
      allrooms: [],
      user_all: [],
      orderinfo: {},
      numlen: 0,
      addinfo: {
        departId: 0,
        departName: '',
        commitUserId: '',
        phoneNo: '',
        illustrate: '',
        enclosure: '',
        isRepeat: 0,
        isWarranty: 0,
        isMaterialWarranty: 0,
        sourceId: 1,
        emergenceId: 1,
        rangeId: 1,
        faultDescription: '',
        address: '',
        commitUserName: '',
        faultTypeId: '',
        faultCauseId: '',
        id: ''
      },
      telpage: 1,
      left_act: 0,
      order_tab: 0,
      type: 0,
      zNodes_u: [],
      ztree_obj_u: {},
      treeClickCount4: 0,
      setting_u: {
        treeId: 'id',
        data: {
          key: {
            name: 'name'
          }
        },
        callback: {
          onClick: this.choseroom_user
        }
      },
      treeClickCount: 0,
      setting: {
        treeId: 'id',
        data: {
          key: {
            name: 'name'
          }
        },
        callback: {
          onClick: this.choseroom
        }
      },
      zNodes: [],
      treeClickCount2: 0,
      setting2: {
        treeId: 'id',
        data: {
          key: {
            name: 'nodeName'
          }
        },
        callback: {
          onClick: this.choseroom2
        }
      },
      zNodes2: [],
      ztree_obj2: {},

      treeClickCount3: 0,
      setting3: {
        treeId: 'id',
        data: {
          key: {
            name: 'nodeName'
          }
        },
        callback: {
          onClick: this.choseroom3
        }
      },

      zNodes3: [],
      ztree_obj3: {},
      zNodes_eng: [],
      ztree_obj_eng: {},
      setting_eng: {
        treeId: 'id',
        data: {
          key: {
            name: 'realName'
          }
        },
        callback: {
          onClick: this.choseroom_eng
        }
      },
      page2: 1,
      inglen2: 0,
      limit2: 10,
      num2: 1,
      page_e: 1,
      inglen_e: 0,
      limit_e: 10,
      num_e: 1,
      userid: '',
      uphone: '',
      restaurants2: [],
      info2: {},
      remark: '',
      did: '',
      duration: ''
    };
  },

  components: {},

  created() {
    window.addEventListener('setItem', () => {
      this.active = sessionStorage.getItem('rou');
    });
    this.token = sessionStorage.getItem('token');
  },

  mounted() {
    this.$permissions = [];
    // this.getuid();
    // this.getopengroup();
    // this.gettype();
    // this.getenrlist();
    // this.gettypeid();

    // this.getgroup_opeions();
    // this.getaddress();
    // this.getpharse();
    // this.getwebsocket();
    // this.getWindowVoice();
    this.init();
    this.speechInit();
    var ua = window.navigator.userAgent.toLowerCase();
    if (ua.match(/MicroMessenger/i) == 'micromessenger') {
      this.qywx = true;
      this.getwx();
    } else {
      // alert(123)
      this.qywx = false;
      this.getding();
    }
    // this.addopen()

    // var that = this
    // setTimeout(function(){
    // 	that.$http.get(that.$url+'/admin/test?id=1&gd=1306&type=1')
    // 		.then(function(response) {

    // 		})
    // 		.catch(function(error) {
    // 			that.$Toast('网络拥堵，刷新一下');
    // 		});
    // },2000)
  },
  watch: {
    // $route: {
    //   handler: function (route) {
    // 	console.log(this.$route.params.title)
    // 	this.getprower()
    //   },
    //   immediate: true,
    // },
    playaud2: {
      handler(newValue, oldValue) {
        if (newValue) {
          this.$refs.aud2[0].play();
        } else {
          this.$refs.aud2[0].pause();
        }
      }
    },
    typesearch: {
      handler(newValue, oldValue) {
        if (newValue == '') {
        } else {
          this.gettypetree();
        }
      }
    },
    coursesearch: {
      handler(newValue, oldValue) {
        if (newValue == '') {
        } else {
          this.getcoursetree();
        }
      }
    },
    roomsearch: {
      handler(newValue, oldValue) {
        if (newValue == '') {
        } else {
          this.getallrooms();
        }
      }
    },
    engname: {
      handler(newValue, oldValue) {
        if (newValue == '') {
        } else {
          this.getenrlist();
        }
      }
    }
  },
  methods: {
    async init() {
      this.operatingSystem = await OSInfo.getOSInfo();
      // var userAgent = navigator.userAgent;
      // this.chromef = false
      // if (userAgent.indexOf("Chrome") > -1){
      //     this.chromef= true;
      //  }
    },
    //  async speak(text) {
    //         if (!this.isSpeaking) { // 如果没有正在播放就进行播放
    //           this.isSpeaking = true; // 标志为正在播放
    //           const utterance = new SpeechSynthesisUtterance(text);
    //           utterance.onend = () => {
    //             this.isSpeaking = false; // 播放结束后置标志为未播放
    //           };
    //           utterance.rate = 0.8;
    //           utterance.voice = speechSynthesis.getVoices()[0];
    //           speechSynthesis.speak(utterance);
    //         } else {
    //           return ''
    //         }
    //       },
    // getWindowVoice(){  // 获取浏览器中语音 (中文 + 本地服务)
    //    return window.speechSynthesis.getVoices().find(item => item.localService && item.lang === 'zh-CN')
    // },
    //显示当前时间（年月日时分秒）
    timeFormate(timeStamp) {
      let year = new Date(timeStamp).getFullYear();
      let month =
        new Date(timeStamp).getMonth() + 1 < 10
          ? '0' + (new Date(timeStamp).getMonth() + 1)
          : new Date(timeStamp).getMonth() + 1;
      let date =
        new Date(timeStamp).getDate() < 10
          ? '0' + new Date(timeStamp).getDate()
          : new Date(timeStamp).getDate();
      let hh =
        new Date(timeStamp).getHours() < 10
          ? '0' + new Date(timeStamp).getHours()
          : new Date(timeStamp).getHours();
      let mm =
        new Date(timeStamp).getMinutes() < 10
          ? '0' + new Date(timeStamp).getMinutes()
          : new Date(timeStamp).getMinutes();
      let ss =
        new Date(timeStamp).getSeconds() < 10
          ? '0' + new Date(timeStamp).getSeconds()
          : new Date(timeStamp).getSeconds();
      let week = new Date(timeStamp).getDay();
      let weeks = ['日', '一', '二', '三', '四', '五', '六'];
      return year + '-' + month + '-' + date;
    },
    speakTtsSpeech() {
      // var text = "报修时间："+this.jdinfo.createDate+"，报修人："+this.jdinfo.createName+'，电话'
      this.speech.speak({ text: this.jdinfo.broadcastMes }).then(() => {
        console.log('读取成功');
      });
    },
    speechInit() {
      this.speech = new Speech();
      this.speech.setLanguage('zh-CN');
      this.speech.init().then(() => {});
    },
    takeeorder(id) {
      this.showloading = true;
      var param = {
        id: id
      };
      var that = this;
      this.$http
        .post(this.$url + '/main/receive', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          // console.log(that.$refs.child)
          that.$refs.child.getlist();
          that.showloading = false;
          that.jiedan = false;
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getallerdai() {
      var that = this;
      this.$http
        .get(this.$url + '/telType/two/Select')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.erdaiarr = response.data.data;
          that.erdai = '';
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    binddeptphone() {
      // this.addinfo.phoneNo
      if (this.addinfo.phoneNo == '' || this.deptphone == '') {
        this.$Toast('请填写完整');
        return;
      }
      this.showloading = true;
      var param = {
        deptId: this.deptphone,
        phone: this.addinfo.phoneNo
      };
      var that = this;
      this.$http
        .post(this.$url + '/sys/dept/addDeptPhone', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.dialogVisible = false;
          that.getdert(that.addinfo.phoneNo);
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    adddeptphone() {
      this.roomsearch = '';
      this.deptphone = '';
      this.dialogVisible = true;
      this.getallrooms();
    },
    selectsys(e) {
      this.getrooms2(e);
      this.getalltype(e);
      this.gettypetree(e);
    },
    getopen() {
      this.showloading = true;

      var that = this;
      this.$http
        .get(this.$url + '/moreSys/open/select')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.checked = response.data == 1 ? true : false;
          if (that.checked) {
            that.getSysSon();
          } else {
            that.getalltype();
            that.gettypetree();
          }
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getallSysSon() {
      var that = this;
      this.$http
        .post(this.$url + '/moreSys/select')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.sys_options = response.data.data;
          that.sys_value = that.sys_options[0].id;
          // var arr = []
          // for (var i = 0; i < response.data.data.length; i++) {
          // 	arr.push(response.data.data[i].id)
          // }
          // var ids = ''
          // if (arr.length > 0) {
          // 	ids = arr.join(',')
          // }
          that.sysids = '';
          that.getalltype();
          that.gettypetree();
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getSysSon() {
      var that = this;
      var param = {
        userId: sessionStorage.getItem('uid')
      };
      this.$http
        .post(this.$url + '/sys/user/getSysSon', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.sys_options = response.data.data;
          if (that.sys_options.length == 0) {
            that.getallSysSon();
          } else {
            var arr = [];
            for (var i = 0; i < response.data.data.length; i++) {
              arr.push(response.data.data[i].id);
            }
            var ids = '';
            if (arr.length > 0) {
              ids = arr.join(',');
            }
            that.sys_value = that.sys_options[0].id;
            that.sysids = ids;
            that.getalltype(that.sys_value);
            that.gettypetree(that.sys_value);
          }
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getremoteIdarr() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/group/phoneGroup')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.remoteIdarr = response.data.data;
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    sear_eng(item) {
      this.engname = item.realName;
      this.servicemanId = item.id;
      this.addinfo.servicemanId = item.id;
      this.getengslist();
    },
    // 获取分组
    getgroup_opeions() {
      this.showloading = true;

      var that = this;
      this.$http
        .get(this.$url + '/engineer/selectGroup')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.group_options = response.data.data;
          // that.getgroup_opeions.unshift({name:'全部',value:''})
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 查看字段是否必填
    getaddress() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/main/getZdChoose')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          for (var i = 0; i < response.data.data.length; i++) {
            response.data.data[i].isChoose = response.data.data[i].isChoose == 1 ? true : false;
            console.log(response.data.data[i].isChoose);
            if (response.data.data[i].zdName == '报修科室') {
              that.zddert = response.data.data[i].isChoose;
              sessionStorage.setItem('dert', that.zddert);
            } else if (response.data.data[i].zdName == '报修地址') {
              that.zdaddress = response.data.data[i].isChoose;
              sessionStorage.setItem('address', that.zdaddress);
            } else if (response.data.data[i].zdName == '报修人电话') {
              that.zdtel = response.data.data[i].isChoose;
              sessionStorage.setItem('tel', that.zdtel);
            } else if (response.data.data[i].zdName == '故障分类') {
              that.zdtype = response.data.data[i].isChoose;
              sessionStorage.setItem('type', that.zdtype);
            }
          }
          that.$forceUpdate();
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 查询是否开启分组
    getopengroup() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/main/getGdIsGrouped')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          var group = response.data.data == 1 ? true : false;
          sessionStorage.setItem('opengroup', group);
          that.group = group;
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getgrouplist() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/group/getEngineerAndPhone')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          for (var i = 0; i < response.data.data.length; i++) {
            response.data.data[i].show = true;
          }
          that.grouplist = response.data.data;
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    dosign() {
      var that = this;
      this.showloading = true;
      var param = {
        recordId: this.addinfo.recordId ? this.addinfo.recordId : this.tellist[this.left_act].id,
        mark: this.mark
      };
      this.$http
        .post(this.$url + '/memo/update/mark', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          that.showbiaoji = false;
          that.mark = 2;
          // that.dtime--
          console.log(that.dtime);
          // if(that.dtime > 0){

          // 	that.gettellist('a')
          // 	that.addopen()
          // }else{
          // 	that.showadd = false
          // 	that.tel = false
          that.showloading = false;
          // 	that.$router.push('/list')
          // }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')
        });
    },
    sign() {
      this.getgrouplist();
      this.mark = 2;
      this.showbiaoji = true;
    },
    getprower() {
      var that = this;
      var param = {
        userName: this.info.userName
      };
      this.$http
        .post(this.$url + '/sys/right/person', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.data.length == 0) {
            sessionStorage.setItem('permissions', []);
            that.$permissions = [];
            Vue.prototype.$permissions = [];

            sessionStorage.setItem('rou', 8);
            that.$router.push('/log');
            return;
          } else if (response.data.data == null) {
            that.getprower();
            return;
          } else {
            sessionStorage.setItem('permissions', response.data.data);
            var per = sessionStorage.getItem('permissions').split(',');
            for (var i = 0; i < per.length; i++) {
              per[i] = parseInt(per[i]);
            }
            Vue.prototype.$permissions = per;
            that.$permissions = per;

            // console.log(that.$permissions)

            that.$forceUpdate();
            // ||that.$permissions.indexOf(56) != -1 || that.$permissions.indexOf(58) != -1 || that.$permissions.indexOf(60) != -1
            if (
              that.$permissions.indexOf(8) != -1 ||
              that.$permissions.indexOf(11) != -1 ||
              that.$permissions.indexOf(101) != -1 ||
              that.$permissions.indexOf(14) != -1 ||
              that.$permissions.indexOf(83) != -1 ||
              that.$permissions.indexOf(42) != -1
            ) {
              // console.log('有工单权限')
              that.active = 1;
              sessionStorage.setItem('rou', 1);
              if (that.$permissions.indexOf(8) != -1) {
                that.$router.push('/list');
              } else if (that.$permissions.indexOf(11) != -1) {
                that.$router.push('/workorder');
              } else if (that.$permissions.indexOf(101) != -1) {
                that.$router.push('/callLog');
              } else if (that.$permissions.indexOf(14) != -1) {
                that.$router.push('/searchorder');
              } else if (that.$permissions.indexOf(83) != -1) {
                that.$router.push('/statistical_engineer');
              } else if (that.$permissions.indexOf(42) != -1) {
                that.$router.push('/automatic');
              }
            } else if (
              that.$permissions.indexOf(166) != -1 ||
              that.$permissions.indexOf(170) != -1 ||
              that.$permissions.indexOf(174) != -1 ||
              that.$permissions.indexOf(178) != -1 ||
              that.$permissions.indexOf(181) != -1 ||
              that.$permissions.indexOf(183) != -1
            ) {
              sessionStorage.setItem('rou', 2);
              that.active = 2;
              if (that.$permissions.indexOf(166) != -1) {
                that.$router.push('/allProject');
              } else if (that.$permissions.indexOf(170) != -1) {
                that.$router.push('/task');
              } else if (that.$permissions.indexOf(174) != -1) {
                that.$router.push('/projectDynamics');
              } else if (that.$permissions.indexOf(178) != -1) {
                that.$router.push('/xmTemplate');
              } else if (that.$permissions.indexOf(181) != -1) {
                that.$router.push('/statistics');
              } else if (that.$permissions.indexOf(183) != -1) {
                that.$router.push('/demand');
              }
            } else if (
              that.$permissions.indexOf(187) != -1 ||
              that.$permissions.indexOf(191) != -1 ||
              that.$permissions.indexOf(195) != -1 ||
              that.$permissions.indexOf(198) != -1 ||
              that.$permissions.indexOf(200) != -1
            ) {
              sessionStorage.setItem('rou', 4);
              that.active = 4;
              if (that.$permissions.indexOf(187) != -1) {
                that.$router.push('/agreement');
              } else if (that.$permissions.indexOf(191) != -1) {
                that.$router.push('/xminvoice');
              } else if (that.$permissions.indexOf(195) != -1) {
                that.$router.push('/supplier');
              } else if (that.$permissions.indexOf(198) != -1) {
                that.$router.push('/needpay');
              } else if (that.$permissions.indexOf(200) != -1) {
                that.$router.push('/contract');
              }
            } else if (
              that.$permissions.indexOf(131) != -1 ||
              that.$permissions.indexOf(147) != -1 ||
              that.$permissions.indexOf(149) != -1 ||
              that.$permissions.indexOf(142) != -1 ||
              that.$permissions.indexOf(137) != -1 ||
              $permissions.indexOf(140) != -1
            ) {
              sessionStorage.setItem('rou', 5);
              that.active = 5;

              if (that.$permissions.indexOf(131) != -1) {
                that.$router.push('/property');
              } else if (that.$permissions.indexOf(147) != -1) {
                that.$router.push('/editApprove');
              } else if (that.$permissions.indexOf(149) != -1) {
                that.$router.push('/scrapApprove');
              } else if (that.$permissions.indexOf(142) != -1) {
                that.$router.push('/scrap');
              } else if (that.$permissions.indexOf(137) != -1) {
                that.$router.push('/brand');
              } else if (that.$permissions.indexOf(140) != -1) {
                that.$router.push('/print');
              }
            } else if (
              that.$permissions.indexOf(216) != -1 ||
              that.$permissions.indexOf(222) != -1 ||
              that.$permissions.indexOf(228) != -1 ||
              that.$permissions.indexOf(236) != -1 ||
              that.$permissions.indexOf(240) != -1 ||
              $permissions.indexOf(250) != -1 ||
              $permissions.indexOf(258) != -1
            ) {
              sessionStorage.setItem('rou', 3);
              that.active = 3;
              if (that.$permissions.indexOf(216) != -1) {
                that.$router.push('/unit');
              } else if (that.$permissions.indexOf(222) != -1) {
                that.$router.push('/assetInspection');
              } else if (that.$permissions.indexOf(228) != -1) {
                that.$router.push('/record');
              } else if (that.$permissions.indexOf(236) != -1) {
                that.$router.push('/inspect_day');
              } else if (that.$permissions.indexOf(240) != -1) {
                that.$router.push('/inspect_peo');
              } else if (that.$permissions.indexOf(250) != -1) {
                that.$router.push('/period');
              } else if (that.$permissions.indexOf(258) != -1) {
                that.$router.push('/inspect_type');
              }
            } else if (
              that.$permissions.indexOf(56) != -1 ||
              that.$permissions.indexOf(58) != -1 ||
              that.$permissions.indexOf(60) != -1
            ) {
              sessionStorage.setItem('rou', 6);
              that.active = 6;
              if (that.permissions.indexOf(56) != -1) {
                that.$router.push('/repositorySearch');
              } else if (that.permissions.indexOf(58) != -1) {
                that.$router.push('/myRepository');
              } else if (that.permissions.indexOf(60) != -1) {
                that.$router.push('/repositoryAudit');
              }
            } else if (
              that.$permissions.indexOf(70) != -1 ||
              that.$permissions.indexOf(73) != -1 ||
              that.$permissions.indexOf(76) != -1 ||
              that.$permissions.indexOf(79) != -1 ||
              that.$permissions.indexOf(93) != -1 ||
              that.$permissions.indexOf(279) != -1 ||
              that.$permissions.indexOf(280) != -1 ||
              that.$permissions.indexOf(282) != -1 ||
              that.$permissions.indexOf(285) != -1
            ) {
              sessionStorage.setItem('rou', 7);
              that.active = 7;
              if (that.permissions.indexOf(70) != -1) {
                url = '/department';
              } else if (that.permissions.indexOf(73) != -1) {
                url = '/userlist';
              } else if (that.permissions.indexOf(76) != -1) {
                url = '/group';
              } else if (that.permissions.indexOf(79) != -1) {
                url = '/engineer';
              } else if (that.permissions.indexOf(93) != -1) {
                url = '/permissions';
              } else if (that.uname == 'admin') {
                url = '/setting';
              }
            } else {
              sessionStorage.setItem('rou', 8);
              that.active = 8;
              that.$router.push('/log');
            }

            that.$forceUpdate();
          }
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    audioinit(i) {
      var aud = this.$refs.aud2[0];
      console.log(aud);
      console.log(aud.duration);
      if (aud) {
        this.duration = Math.floor(aud.duration);
      } else {
        this.audioinit(i);
      }
    },
    // 故障原因选择
    choseroom3(data, node, treeNode) {
      this.treeClickCount3++;
      if (this.treeClickCount3 >= 2) {
        return;
      }
      this.timer = window.setTimeout(() => {
        if (this.treeClickCount3 == 1) {
          this.treeClickCount3 = 0;
          this.addinfo.faultCauseId = treeNode.id;
          this.info2.faultCauseId = treeNode.id;
          this.faultCausename = treeNode.nodeName;
          this.isclick4 = true;
        } else if (this.treeClickCount3 > 1) {
          this.treeClickCount3 = 0;
          this.ztree_obj3.cancelSelectedNode();
          console.log('双击事件,可在此处理对应逻辑');
        }
      }, 300);
    },
    // 处理
    doorder() {
      var that = this;
      if (this.order_tab == 0) {
        // console.log(this.isclick3)
        // console.log(this.isclick4)

        // if( !this.isclick3){
        // 	this.$Toast("请点击选择故障分类");
        // 	this.info2.faultTypeId=''
        // 	return false;
        // }
        // if(!this.isclick4){
        // 	this.$Toast("请点击选择故障原因");
        // 	this.info2.faultCauseId=''
        // 	return false;
        // }
        this.info2.process = this.info2.process ? this.info2.process : '';
        // if(this.info2.process.trim()==''){
        // 	this.$Toast('请填写处理过程');
        // 	return
        // }
        this.info2.gdInfoId = this.id;
        this.info2.gdComing = 1;
        this.info2.enclosure = this.files.join(',');
        this.showloading = true;
        this.$http
          .post(this.$url + '/handle/finish', this.$qs.stringify(this.info2))
          .then(function (response) {
            if (response.data.code == '1410') {
              that.$Toast(response.data.msg);
              sessionStorage.setItem('token', '');
              that.$router.push('/login');
              return;
            }
            that.$Toast(response.data.msg);
            that.showstop = false;
            that.tel = false;
            that.isclick3 = true;
            that.isclick4 = true;
            that.faultTypename = '';
            that.faultCausename = '';
            that.files = [];
            that.fileList = [];
            // deviceState:1,
            that.info2 = {
              faultTypeId: '',
              faultCauseId: '',
              gdInfoId: '',
              deviceState: 1,
              way: 1,
              process: '',
              causeOf: '',
              enclosure: ''
            };
            // that.getlist()
            that.gettellist();
            setTimeout(function () {
              that.getdert(that.tellist[0].phoneNo);
            }, 500);
          })
          .catch(function (error) {
            sessionStorage.setItem('token', 'undefined');
            that.$router.push('/login');
          });
      } else {
        if (this.remark.trim() == '') {
          this.$Toast('请填写处理过程');
          return;
        }
        var enclosure = this.files2.join(',');
        var param = {
          gdInfoId: this.id,
          enclosure: enclosure,
          remark: this.remark
        };

        this.showloading = true;
        this.$http
          .post(this.$url + '/handle/step', this.$qs.stringify(param))
          .then(function (response) {
            if (response.data.code == '1410') {
              that.$Toast(response.data.msg);
              sessionStorage.setItem('token', '');
              that.$router.push('/login');
              return;
            }
            that.$Toast(response.data.msg);
            that.showstop = false;
            that.tel = false;
            that.remark = '';
            that.files2 = [];
            that.fileList2 = [];
            that.left_act = 0;
            that.gettellist();
            setTimeout(function () {
              that.getdert(that.tellist[0].phoneNo);
            }, 500);
          })
          .catch(function (error) {
            sessionStorage.setItem('token', 'undefined');
            that.$router.push('/login');
          });
      }
    },
    changenum2(e) {
      console.log(e);
      this.numlen2 = this.info2.process.length;
    },
    querySearch2(queryString, cb) {
      var restaurants = this.restaurants2;
      var results = queryString ? restaurants.filter(this.createFilter2(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter2(queryString) {
      return (restaurant) => {
        console.log(restaurant.name);

        return restaurant.name != null
          ? restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1
          : [];
      };
    },
    handleSelect2(item) {
      this.addinfo.faultCauseId = item.id;
      this.info2.faultCauseId = item.id;
      this.isclick4 = true;
    },
    closeSendOrder() {
      this.showSendOrder = false;
      this.tel = false;
      this.engname = '';
      this.servicemanId = '';
      this.addinfo.servicemanId = '';
      this.ztree_obj_eng.cancelSelectedNode();
      this.getenrlist();
      this.getengslist();

      if (!this.resendid) {
        this.showadd = true;

        this.$nextTick(() => {
          this.$refs.adds.scrollTop = 0;
        });
      }
    },
    getenrlist() {
      var that = this;
      var param = {};
      if (this.engname) {
        param = {
          name: this.engname
        };
      }
      this.$http
        .post(this.$url + '/group/listAll', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (!that.engname) {
            that.enrlist = response.data.data;
            that.zNodes_eng = response.data.data;
            that.ztree_obj_eng = $.fn.zTree.init(
              $('#treeDemo_u_index'),
              that.setting_eng,
              that.zNodes_eng
            );
            var nodes4 = that.ztree_obj_eng.getNodes();
            for (var i = 0; i < nodes4.length; i++) {
              //设置节点展开
              that.ztree_obj_eng.expandNode(nodes4[i], true, false, true);
            }
            // 	that.showsearch=false
          } else {
            that.enrlist = response.data.data[0].children;
            if (response.data.data[0].children.length > 0) {
              that.addinfo.servicemanId = response.data.data[0].children[0].id;
              that.servicemanId = response.data.data[0].children[0].id;
            }
          }
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    sure_user() {
      this.user_alert = false;
      this.word_user = '';
      this.deptId = '';
      this.ztree_obj_u.cancelSelectedNode();
      this.addinfo.commitUserName = this.username;
      // this.addinfo.phoneNo = this.addinfo.phoneNo?this.addinfo.phoneNo:this.uphone
      this.addinfo.phoneNo = this.uphone ? this.uphone : this.addinfo.phoneNo;
      this.addinfo.commitUserId = this.userid;
      // this.getalluserlist()
    },
    handleCurrentChange2(val) {
      console.log(`当前页: ${val}`);
      this.page2 = val;
      this.getalluserlist();
    },
    // 派单
    send() {
      if (this.addinfo.servicemanId == '' && this.addinfo.arrangeGroup == '') {
        this.$Toast('请选择工程师');
        return;
      }
      this.increase();
    },
    closeusertalert() {
      this.user_alert = false;
      this.username = '';
      this.word_user = '';
      this.userid = '';
      this.deptId = '';
      this.uphone = '';
      this.ztree_obj_u.cancelSelectedNode();
      this.getalluserlist();
    },
    // 科室树状图选择
    choseroom_user(data, node, treeNode) {
      this.treeClickCount4++;
      if (this.treeClickCount4 >= 2) {
        return;
      }
      this.timer = window.setTimeout(() => {
        if (this.treeClickCount4 == 1) {
          this.treeClickCount4 = 0;
          console.log('单击事件,可在此处理对应逻辑');
          this.did = treeNode.id;
          this.getalluserlist();
        } else if (this.treeClickCount4 > 1) {
          this.treeClickCount4 = 0;

          this.ztree_obj_u.cancelSelectedNode();
          console.log('双击事件,可在此处理对应逻辑');
        }
      }, 300);
    },
    sear_choserome(item) {
      this.addinfo.departId = item.id;
      this.addinfo.departName = item.name;
      this.addinfo.address = item.address;
    },
    // 获取搜索的故障分类
    gettypetree(ids) {
      var that = this;
      var url = '';
      var sysSonIds = '';
      if (typeof ids != 'object' && ids) {
        sysSonIds = ids;
      } else if (this.sys_value) {
        sysSonIds = this.sys_value;
      } else if (this.sysids) {
        sysSonIds = this.sysids;
      }
      if (sysSonIds) {
        url = encodeURI(
          this.$url + '/fault/type/select?name=' + this.typesearch + '&sysSonIds=' + sysSonIds
        );
      } else {
        url = encodeURI(this.$url + '/fault/type/select?name=' + this.typesearch);
      }
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.typetree = response.data.data;
          that.$forceUpdate();
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 知識分類搜索结果点击
    sear_chosetype(item) {
      this.addinfo.faultTypeId = item.id;
      this.addinfo.faultDescription = item.treeLoad;
      this.faultTypename = item.name;
      this.typesearch = item.name;
      this.treeLoad = item.treeLoad;

      this.isclick3 = true;
    },
    // 科室树状图选择
    choseroom(data, node, treeNode) {
      this.treeClickCount++;
      if (this.treeClickCount >= 2) {
        return;
      }
      var that = this;
      this.timer = window.setTimeout(() => {
        console.log(this.treeClickCount);
        if (that.treeClickCount == 1) {
          that.treeClickCount = 0;

          console.log('单击事件,可在此处理对应逻辑');
          that.addinfo.departId = treeNode.id;
          that.addinfo.departName = treeNode.name;
          that.addinfo.address = treeNode.address;

          that.isclick1 = true;
        } else if (that.treeClickCount > 1) {
          that.treeClickCount = 0;
          console.log('双击事件,可在此处理对应逻辑');
        }
      }, 300);
    },
    // 故障分类选择
    choseroom2(data, node, treeNode) {
      if (
        (treeNode.treeLoad.substr(0, 4) == '徐汇院区' && treeNode.children.length != 0) ||
        (treeNode.treeLoad.substr(0, 4) == '临港院区' && treeNode.children.length != 0)
      ) {
        this.ztree_obj2.cancelSelectedNode();
        return;
      }
      if (treeNode.parentId == 0) {
        this.ztree_obj2.cancelSelectedNode();
        return;
      }
      this.treeClickCount2++;
      if (this.treeClickCount2 >= 2) {
        return;
      }
      this.timer = window.setTimeout(() => {
        if (this.treeClickCount2 == 1) {
          this.treeClickCount2 = 0;
          console.log('单击事件,可在此处理对应逻辑');
          this.addinfo.faultTypeId = treeNode.id;
          this.addinfo.faultDescription = treeNode.treeLoad;
          this.faultTypename = treeNode.nodeName;
          this.treeLoad = treeNode.treeLoad;
          this.isclick2 = true;
          this.isclick3 = true;
        } else if (this.treeClickCount2 > 1) {
          this.treeClickCount2 = 0;
          this.ztree_obj2.cancelSelectedNode();
          console.log('双击事件,可在此处理对应逻辑');
        }
      }, 300);
    },
    // 选择工程师
    choseroom_eng(data, node, treeNode) {
      console.log(treeNode);
      // if(!treeNode.parentTId){
      // 	this.servicemanId = ''
      // 	this.addinfo.servicemanId = ''
      // 	this.ztree_obj_eng.cancelSelectedNode();
      // 	return
      // }
      this.treeClickCount4++;
      if (this.treeClickCount4 >= 2) {
        return;
      }
      this.timer = window.setTimeout(() => {
        if (this.treeClickCount4 == 1) {
          this.treeClickCount4 = 0;
          console.log('单击事件,可在此处理对应逻辑');
          console.log(treeNode.name);
          if (treeNode.name == undefined) {
            this.servicemanId = treeNode.id;
            this.addinfo.servicemanId = treeNode.id;
            this.info.arrangeGroup = '';
            this.getengslist();
          } else {
            // this.ztree_obj_eng.cancelSelectedNode();
            // this.servicemanId=''
            this.$confirm('是否确定派单到组?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            })
              .then(() => {
                this.servicemanId = treeNode.id;
                this.addinfo.servicemanId = '';
                this.addinfo.arrangeGroup = treeNode.id;
                this.getengslist();
              })
              .catch(() => {
                this.ztree_obj_eng.cancelSelectedNode();
                this.servicemanId = '';
                this.getengslist();
              });
          }
        } else if (this.treeClickCount4 > 1) {
          this.treeClickCount4 = 0;
          this.ztree_obj_eng.cancelSelectedNode();
          console.log('双击事件,可在此处理对应逻辑');
        }
      }, 300);
    },
    // 获取弹窗里的用户
    getalluserlist() {
      var id = this.did ? this.did : '';
      var that = this;
      var url = encodeURI(
        this.$url +
          '/sys/user/list?page=' +
          this.page2 +
          '&limit=' +
          this.limit2 +
          '&deptId=' +
          id +
          '&userName=' +
          this.word_user
      );
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.user_all = response.data.data.records;
          for (var i = 0; i < that.user_all.length; i++) {
            that.user_all[i].id = window.atob(that.user_all[i].id);
          }
          that.inglen2 = response.data.data.total;
          that.num2 = response.data.data.pages;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 获取科室
    getrooms() {
      var param = {
        parentId: 0
      };
      var that = this;
      this.$http
        .post(this.$url + '/sys/dept/tree', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }

          that.zNodes = response.data.data;
          that.ztree_obj = $.fn.zTree.init($('#treeDemo_index'), that.setting, that.zNodes);
          var nodes = that.ztree_obj.getNodes();
          for (var i = 0; i < nodes.length; i++) {
            //设置节点展开
            that.ztree_obj.expandNode(nodes[i], true, false, true);
          }

          that.zNodes_u = response.data.data;
          that.ztree_obj_u = $.fn.zTree.init($('#treeDemo4_index'), that.setting_u, that.zNodes_u);
          var nodes = that.ztree_obj_u.getNodes();
          for (var i = 0; i < nodes.length; i++) {
            //设置节点展开
            that.ztree_obj_u.expandNode(nodes[i], true, false, true);
          }
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    closestop() {
      this.showstop = false;
      this.tel = false;
      this.result = '';
      this.illustrate = '';
    },
    changetel(i) {
      this.addinfo = {
        departId: 0,
        recordId: '',
        departName: '',
        commitUserId: '',
        phoneNo: '',
        illustrate: '',
        enclosure: '',
        isRepeat: 0,
        isWarranty: 0,
        isMaterialWarranty: 0,
        sourceId: 1,
        emergenceId: 1,
        rangeId: 1,
        faultDescription: '',
        address: '',
        commitUserName: '',
        faultTypeId: '',
        faultCauseId: ''
      };
      this.faultTypename = '';
      this.faultCausename = '';
      this.treeLoad = '';
      this.sb = '';
      this.left_act = i;
      this.addinfo.recordId = this.tellist[i].id;
      this.getdert(this.tellist[i].phoneNo);
    },
    // 获取故障分类
    getrooms2() {
      var param = {
        parentId: 0
      };
      var that = this;
      this.$http
        .get(this.$url + '/fault/type/tree?parentId=-1')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.zNodes2 = response.data.data;
          that.ztree_obj2 = $.fn.zTree.init($('#treeDemo2_index'), that.setting2, that.zNodes2);
          var nodes4 = that.ztree_obj2.getNodes();
          for (var i = 0; i < nodes4.length; i++) {
            //设置节点展开
            that.ztree_obj2.expandNode(nodes4[i], true, false, true);
          }
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },

    // 获取所有故障分类
    getalltype(ids) {
      var url = '';
      var that = this;
      var sysSonIds = '';
      if (typeof ids != 'object' && ids) {
        sysSonIds = ids;
      } else if (this.sys_value) {
        sysSonIds = this.sys_value;
      } else if (this.sysids) {
        sysSonIds = this.sysids;
      }
      that.restaurants = [];
      if (sysSonIds) {
        url = this.$url + '/fault/type/select?name=' + '&sysSonIds=' + sysSonIds;
      } else {
        url = this.$url + '/fault/type/select?name=';
      }
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.restaurants = [];
          console.log(response.data.data);
          for (var i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].parentId != 0) {
              that.restaurants.push(response.data.data[i]);
            }
          }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 获取全部科室
    getallrooms() {
      var that = this;
      var url = encodeURI(this.$url + '/sys/dept/select?name=' + this.roomsearch);
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.allrooms = response.data.data;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 获取常用语
    getpharse() {
      var that = this;
      this.$http
        .get(this.$url + '/common/list?typeId=6')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.phraseList = response.data.data;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });

      this.$http
        .get(this.$url + '/common/list?typeId=1')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.stopreslist = response.data.data;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
      this.$http
        .get(this.$url + '/common/list?typeId=7')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.openstoplist = response.data.data;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    querySearch_u(queryString, cb) {
      var that = this;
      var name = this.info.commitUserName ? this.info.commitUserName : '';
      var id = this.info.departId ? this.info.departId : '';
      var url = encodeURI(this.$url + '/sys/user/select?realName=' + name);
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.restaurants_u = response.data.data;
          that.restaurants_u.unshift({
            userName: '账号',
            realName: '姓名',
            departName: '科室',
            phoneNo: '电话'
          });
          var restaurants_u = that.restaurants_u;
          var results = queryString
            ? restaurants_u.filter(that.createFilter_u(queryString))
            : restaurants_u;
          // 调用 callback 返回建议列表的数据
          if (results.length == 0) {
            results.unshift({ userName: '暂无内容', realName: '', departName: '', phoneNo: '' });
          } else {
            if (results[0].id) {
              results.unshift({
                userName: '账号',
                realName: '姓名',
                departName: '科室',
                phoneNo: '电话'
              });
            }
          }

          cb(results);
          // console.log(that.restaurants)
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    createFilter_u(queryString) {
      return (restaurant) => {
        // if(restaurant.realName){
        return restaurant.realName.toLowerCase().indexOf(queryString.toLowerCase()) != -1;
        // }
      };
    },
    handleSelect_u(item) {
      if (!item.id) {
        this.addinfo.commitUserName = '';
        return;
      }
      this.addinfo.commitUserName = item.realName;
      this.addinfo.commitUserId = item.id;
      // this.addinfo.phoneNo = this.addinfo.phoneNo?this.addinfo.phoneNo:item.phoneNo
      this.addinfo.phoneNo = item.phoneNo ? item.phoneNo : this.addinfo.phoneNo;
      // console.log(this.addinfo.commitUserName);
    },
    querySearch(queryString, cb) {
      var restaurants = this.restaurants;
      console.log(restaurants);
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return (restaurant) => {
        return restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1;
      };
    },
    handleSelect(item) {
      this.addinfo.faultTypeId = item.id;
      this.addinfo.faultDescription = item.treeLoad;
      this.treeLoad = item.treeLoad;
      this.isclick2 = true;
      this.isclick3 = true;
    },
    querySearch_d(queryString, cb) {
      var that = this;
      var url = encodeURI(this.$url + '/sys/dept/select?name=' + this.roomsearch);
      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.allrooms = response.data.data;
          var restaurants_d = that.allrooms;
          var results = queryString
            ? restaurants_d.filter(that.createFilter_d(queryString))
            : restaurants_d;
          // 调用 callback 返回建议列表的数据
          if (results.length == 0) {
            results.unshift({ name: '暂无内容', address: '' });
          } else {
            if (results[0].id) {
              results.unshift({ name: '科室', address: '地址' });
            }
          }

          cb(results);
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    createFilter_d(queryString) {
      return (restaurant) => {
        // console.log(restaurant.name)
        return restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1;
      };
    },
    handleSelect_d(item) {
      if (!item.id) {
        this.addinfo.departName = '';
        return;
      }
      this.addinfo.departName = item.name;
      this.addinfo.departId = item.id;
      this.addinfo.address = item.address;
      this.isclick1 = true;
    },
    del_file(i) {
      var that = this;
      var param = { fileId: this.filesid[i] };
      this.$http
        .post(this.$url + '/main/delete/file', this.$qs.stringify(param))
        .then(function (response) {
          // console.log(response)
          that.files.splice(i, 1);
          that.fileList.splice(i, 1);
          that.filesid.splice(i, 1);
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    del_file2(i) {
      var that = this;
      var param = { fileId: this.files2id[i] };
      this.$http
        .post(this.$url + '/main/delete/file', this.$qs.stringify(param))
        .then(function (response) {
          // console.log(response)
          that.files2.splice(i, 1);
          that.files2id.splice(i, 1);
          that.fileList2.splice(i, 1);
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    del_file3(i) {
      var that = this;
      var param = { fileId: this.files3id[i] };
      this.$http
        .post(this.$url + '/main/delete/file', this.$qs.stringify(param))
        .then(function (response) {
          // console.log(response)
          that.files3.splice(i, 1);
          that.files3id.splice(i, 1);
          that.fileList3.splice(i, 1);
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    uploadsuc2(file, fileList) {
      if (file.code != 0) {
        this.$Toast(file.msg);
        this.showloading = false;
        return;
      }
      this.files2.push(file.data.relativePath);
      this.files2id.push(file.data.id);
      this.showloading = false;
    },
    uploadsuc(file, fileList) {
      if (file.code != 0) {
        this.$Toast(file.msg);
        this.showloading = false;
        return;
      }
      this.files.push(file.data.relativePath);
      this.filesid.push(file.data.id);
      this.showloading = false;
    },
    uploadsuc3(file, fileList) {
      if (file.code != 0) {
        this.$Toast(file.msg);
        this.showloading = false;
        return;
      }
      this.files3.push(file.data.relativePath);
      this.files3id.push(file.data.id);
      this.showloading = false;
    },
    beforeUpload(e) {
      // this.showloading=true
      this.showloading = true;
      const fd = new FormData();
      fd.append('file', e);
      fd.append('project', 'gd');
      fd.append('secret', this.$md5(e.name + 'gd' + e.size));

      var that = this;
      this.$http
        .post(this.$url + '/file/upload', fd, {
          headers: {
            'Content-Type': 'multipart/form-data; boundary=something'
          }
        })
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.code != 0) {
            that.$Toast(response.data.msg);
            that.showloading = false;
            return;
          }
          that.files3.push(response.data.data.relativePath);
          that.files3id.push(response.data.data.id);
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
        });

      return false;
    },
    beforeUpload1(e) {
      // this.showloading=true
      this.showloading = true;
      const fd = new FormData();
      fd.append('file', e);
      fd.append('project', 'gd');
      fd.append('secret', this.$md5(e.name + 'gd' + e.size));

      var that = this;
      this.$http
        .post(this.$url + '/file/upload', fd, {
          headers: {
            'Content-Type': 'multipart/form-data; boundary=something'
          }
        })
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.code != 0) {
            that.$Toast(response.data.msg);
            that.showloading = false;
            return;
          }
          that.files.push(response.data.data.relativePath);
          that.filesid.push(response.data.data.id);
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
        });

      return false;
    },
    beforeUpload2(e) {
      // this.showloading=true
      this.showloading = true;
      const fd = new FormData();
      fd.append('file', e);
      fd.append('project', 'gd');
      fd.append('secret', this.$md5(e.name + 'gd' + e.size));

      var that = this;
      this.$http
        .post(this.$url + '/file/upload', fd, {
          headers: {
            'Content-Type': 'multipart/form-data; boundary=something'
          }
        })
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.code != 0) {
            that.$Toast(response.data.msg);
            that.showloading = false;
            return;
          }
          that.files2.push(response.data.data.relativePath);
          that.files2id.push(response.data.data.id);
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
        });

      return false;
    },
    changenum(e) {
      // console.log(e)
      this.numlen = this.addinfo.illustrate.length;
    },
    closeadd() {
      this.showadd = false;
      this.tel = false;
      this.faultTypename = '';
      this.treeLoad = '';
      this.faultCausename = '';
      this.fileList3 = [];
      this.files3 = [];
      this.files3id = [];

      this.addinfo = {
        departId: 0,
        departName: '',
        commitUserId: '',
        phoneNo: '',
        illustrate: '',
        enclosure: '',
        isRepeat: 0,
        isWarranty: 0,
        isMaterialWarranty: 0,
        sourceId: 1,
        emergenceId: 1,
        rangeId: 1,
        faultDescription: '',
        address: '',
        commitUserName: '',
        faultTypeId: '',
        faultCauseId: '',
        id: ''
      };
      // this.getwebsocket()
    },
    // 故障原因搜索结果点击
    sear_chosecourse(item) {
      this.info2.faultCauseId = item.id;
      this.addinfo.faultCauseId = item.id;
      this.faultCausename = item.name;
      this.coursesearch = item.name;
      this.isclick4 = true;
    },
    // 获取故障原因
    getrooms3() {
      var param = {
        parentId: 0
      };
      var that = this;
      this.$http
        .get(this.$url + '/fault/selectparentId?parentId=-1')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.zNodes3 = response.data.data;
          that.ztree_obj3 = $.fn.zTree.init($('#treeDemo3_index'), that.setting3, that.zNodes3);
          var nodes4 = that.ztree_obj3.getNodes();
          for (var i = 0; i < nodes4.length; i++) {
            //设置节点展开
            that.ztree_obj3.expandNode(nodes4[i], true, false, true);
          }
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 获取故障原因树状图搜索
    getcoursetree() {
      var that = this;
      var url = encodeURI(this.$url + '/fault/cause/select?name=' + this.coursesearch);

      this.$http
        .get(url)
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.coursetree = response.data.data;
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 获取所有故障原因
    getallcourse() {
      var that = this;
      this.$http
        .get(this.$url + '/fault/cause/select?name=')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.restaurants2 = response.data.data;
        })
        .catch(function (error) {});
    },
    stop(type, index, id) {
      this.alerttype = type;
      this.id = id;
      this.getinfo();
      this.getrooms3();
      this.getrooms2();
      this.getcoursetree();
      this.getallcourse();
      this.gettypetree();
      this.showstop = true;
      this.showadd = false;
    },
    // 获取单条详情
    getinfo() {
      var param = {
        id: this.id
      };
      var that = this;
      this.$http
        .post(this.$url + '/main/detail', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.orderinfo = response.data.data;
          that.photolist = [];
          that.orderinfo.photoUrls = that.orderinfo.photoUrls ? that.orderinfo.photoUrls : [];
          for (var i = 0; i < that.orderinfo.photoUrls.length; i++) {
            // console.log(that.chackfile(that.orderinfo.photoUrls[i].url))
            if (that.chackfile(that.orderinfo.photoUrls[i].url) == 'img') {
              that.photolist.push(that.$url + '/' + that.orderinfo.photoUrls[i].url);
            }
          }

          for (var i = 0; i < that.orderinfo.historyEntityList.length; i++) {
            that.orderinfo.historyEntityList[i].enclosure = that.orderinfo.historyEntityList[i]
              .enclosure
              ? that.orderinfo.historyEntityList[i].enclosure.split(',')
              : [];
            that.orderinfo.historyEntityList[i].enclosureList = [];
            for (var j = 0; j < that.orderinfo.historyEntityList[i].enclosure.length; j++) {
              var arr = that.orderinfo.historyEntityList[i].enclosure[j].split('/');
              that.orderinfo.historyEntityList[i].enclosureList[j] =
                that.$url + '/' + that.orderinfo.historyEntityList[i].enclosure[j];
              that.orderinfo.historyEntityList[i].enclosure[j] = {
                name: arr[arr.length - 1],
                url: that.orderinfo.historyEntityList[i].enclosure[j],
                type: that.orderinfo.historyEntityList[i].enclosure[j].substr(
                  that.orderinfo.historyEntityList[i].enclosure[j].length - 4,
                  4
                )
              };
            }
          }
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 添加工单接口
    increase(type) {
      if (this.tellist.length == 0) {
        this.$Toast('请选择正确的通话记录！');
        return;
      }
      // this.addinfo.recordId=1
      this.addinfo.recordId = this.addinfo.recordId
        ? this.addinfo.recordId
        : this.tellist[this.left_act].id;

      this.showloading = true;
      var that = this;

      this.addinfo.enclosure = this.files3.join(',');
      this.addinfo.photoIds = this.files3id.join(',');
      this.addinfo.createId = sessionStorage.getItem('uid');
      this.info.groupId = this.group_value ? this.group_value : null;
      this.info.sysSonId = this.sys_value ? this.sys_value : null;

      this.$http
        .post(this.$url + '/main/save', this.$qs.stringify(this.addinfo))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (type == '3') {
            that.isclick1 = false;
            that.isclick3 = false;
            that.isclick4 = false;
            that.stop('do', 0, response.data.data.id);
          } else {
            that.$Toast('提交成功');
            that.addinfo = {
              departId: 0,
              recordId: '',
              departName: '',
              faultEquipment: '',
              commitUserId: '',
              phoneNo: '',
              illustrate: '',
              enclosure: '',
              photoIds: '',
              isRepeat: 0,
              emergenceId: 1,
              rangeId: 1,
              sourceId: 1,
              faultDescription: '',
              address: '',
              commitUserName: '',
              faultTypeId: '',
              faultCauseId: '',
              servicemanId: ''
            };
            // that.faultTypename=''
            that.treeLoad = '';
            that.faultCausename = '';
            that.sb = '';
            that.files3 = [];
            that.fileList3 = [];
            that.files3id = [];
            that.engname = '';
            that.servicemanId = '';
            that.isclick1 = false;
            that.isclick3 = false;
            that.isclick4 = false;
            that.ztree_obj_eng.cancelSelectedNode();
            // // that.getenrlist()
            // // that.getengslist()
            that.left_act = 0;
            that.dtime--;
            that.showSendOrder = false;

            // console.log(that.dtime)
            if (that.dtime > 0) {
              that.gettellist('a');
              that.addopen();
            } else {
              that.showadd = false;
              that.tel = false;
              that.showloading = false;
              that.$router.push('/list');
            }
          }
        })
        .catch(function (error) {
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    addopen() {
      this.showadd = true;
      // console.log(this.$refs.adds)
      this.$nextTick(() => {
        this.$refs.adds.scrollTop = 0;
      });
      if (this.showadd) {
        // this.getallrooms();
        this.getalltype();
        // this.getuserlist()
      }

      this.getopen();
    },
    // 选择描述
    select_con(item) {
      this.addinfo.faultDescription = item;
    },
    getuserlist() {
      // var that = this
      // var name = this.addinfo.commitUserName?this.addinfo.commitUserName:''
      // var id = this.addinfo.departId?this.addinfo.departId:''
      // var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
      // this.$http.get(url)
      // 	.then(function(response) {
      // 		if (response.data.code == '1410') {
      // 			that.$Toast(response.data.msg);
      // 			sessionStorage.setItem('token', '')
      // 			that.$router.push('/login')
      // 			return
      // 		}
      // 		that.restaurants_u = response.data.data
      // 		that.restaurants_u.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
      // 		// console.log(that.restaurants)
      // 	})
      // 	.catch(function(error) {
      // 		console.log(error);
      // 		// sessionStorage.setItem('token','undefined')
      // 		// that.$router.push('/login')
      // 		that.$Toast('网络拥堵，刷新一下');
      // 	});
    },
    handleCurrentChange_tel(val) {
      console.log(`当前页: ${val}`);
      this.telpage = val;
      this.gettellist();
    },
    handleSizeChange_e(val) {
      console.log(`每页 ${val} 条`);
      this.limit_e = val;
      this.getengslist();
    },
    handleCurrentChange_e(val) {
      console.log(`当前页: ${val}`);
      this.page_e = val;
      this.getengslist();
    },
    gettellist(e) {
      this.showloading = true;
      var param = {
        page: this.telpage,
        // page: 1,
        limit: 100,
        userId: sessionStorage.getItem('uid')
      };

      var that = this;
      // memo/select
      this.$http
        .post(this.$url + '/memo/selectByLastId', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.teltotal = response.data.count;
          that.tellist = [];
          for (var i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].lastGdId == null) {
              that.tellist.push(response.data.data[i]);
            }
          }
          if (e == 'a') {
            that.getdert(that.tellist[0].phoneNo);
          }

          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);

          that.$Toast('网络拥堵，刷新一下');
        });
    },

    getdert(tel) {
      var that = this;
      var param = {
        phoneNo: tel
      };
      // console.log(tel)
      this.$http
        .post(this.$url + '/sys/dept/phone', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.data == null) {
            // that.$Toast('暂无当前手机号信息');
            that.addinfo.phoneNo = tel;
          } else {
            that.addinfo.departId = response.data.data.id;
            that.addinfo.address = response.data.data.address;
            that.addinfo.phoneNo = response.data.data.phone;
            that.addinfo.departName = response.data.data.deptName;
            that.addinfo.commitUserId = response.data.data.userId ? response.data.data.userId : '';
            that.addinfo.commitUserName = response.data.data.username
              ? response.data.data.username
              : '';
            that.isclick1 = true;
            // console.log(that.info)
          }
        })
        .catch(function (error) {
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getwebsocket() {
      var that = this;
      var url = this.$url.split('://')[1];
      var url2 = this.$url.split('://')[1].split('/gd')[0];
      let websocket;
      if (typeof WebSocket === 'undefined') {
        console.log('您的浏览器不支持WebSocket');
        return;
      } else {
        let protocol = 'ws';
        let url = '';
        if (this.$url.split('://')[0] == 'https') {
          protocol = 'wss';
        }
        if (sessionStorage.getItem('port')) {
          url2 = url2.split(':')[0] + ':';
        }

        // console.log(url2)

        url =
          protocol +
          '://' +
          url2 +
          sessionStorage.getItem('port') +
          '/gd/connect?username=' +
          sessionStorage.getItem('uname');

        websocket = new WebSocket(url);
        // 关闭连接
        websocket.onclose = (evt) => {
          console.log('websocket关闭：', evt);
          that.getwebsocket();
        };
      }
      // 建立连接
      websocket.onopen = (e) => {
        console.log('websocket发送数据中');
      };
      // 客户端接收服务端返回的数据
      websocket.onmessage = (evt) => {
        var data = JSON.parse(evt.data);
        // console.log(data)
        // var that = this
        if (data.type == 'popup') {
          that.info.sourceId = 1;
          if (!that.tel) {
            that.tel = true;
            that.getdert(data.message);
            that.gettellist();
            that.addopen();
            that.dtime = 1;
          } else {
            that.left_act = that.left_act + 1;
            that.gettellist();
            that.dtime = that.dtime + 1;
          }
        } else if (data.type == 'inform') {
          that.jdinfo = data.message;
          that.jdinfo.createDate = that.timeFormate(that.jdinfo.createDate);
          that.jiedan = true;
          // alert(that.operatingSystem)
          if (that.operatingSystem == 'Windows 7') {
            // let music1 = new Audio();
            // music1 = require("../assets/images/text2audio.mp3");
            // that.$refs.jdaud.src = music1;
            that.$refs.jdaud.play();
          } else {
            that.speakTtsSpeech();
          }
          // that.speak(that.jdinfo.broadcastMes)
          // window.speechSynthesis.cancel()
          // that.handleSpeak(that.jdinfo.broadcastMes)
        }
      };
      // 发生错误时
      websocket.onerror = (evt) => {
        console.log('websocket错误：', evt);
      };
    },
    // // 语音停止
    //         handleStop(e) {
    //             if(window.speechSynthesis){
    //                 const synth = window.speechSynthesis;
    //                 const msg = new SpeechSynthesisUtterance();
    //                 msg.text = e;
    //                 msg.lang = "zh-CN";
    //                 synth.cancel(msg);
    //             }
    //         },
    //  // 语音播报的函数
    //         handleSpeak(text='有新消息!'){
    // 			console.log(text)
    // 			console.log(window.speechSynthesis)
    //             if(window.speechSynthesis){
    //                 const synth = window.speechSynthesis;
    //                 const msg = new SpeechSynthesisUtterance();
    //                 msg.text = text;     // 文字内容
    //                 msg.lang = "zh-CN";  // 使用的语言:中文
    //                 msg.volume = 1;      // 声音音量：1
    //                 msg.rate = 1;        // 语速：1
    //                 msg.pitch = 1;       // 音高：1
    //                 msg.voice = this.getWindowVoice()  // 使用本地服务合成语音(若是获取不到 请异步获取, 加一个setTimeout)
    //                 synth.speak(msg);    // 播放
    //             }
    //         },
    // 派单右侧列表
    getengslist() {
      this.showloading = true;
      var param = {
        page: this.page_e,
        limit: this.limit_e,
        stateId: 2,
        servicemanId: this.servicemanId
      };
      // console.log(param)
      var that = this;
      this.$http
        .post(this.$url + '/main/select', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.list_e = response.data.data;
          that.inglen_e = response.data.count;
          if (that.inglen_e > that.limit) {
            that.num_e = Math.ceil(that.inglen_e / that.limit_e);
          } else {
            that.num_e = 1;
          }
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          // sessionStorage.setItem('token','undefined')
          // that.$router.push('/login')

          that.$Toast('网络拥堵，刷新一下');
        });
    },
    // 表单提交
    showData(type) {
      this.addinfo.departName = this.addinfo.departName ? this.addinfo.departName : '';
      if (this.addinfo.departName.trim() == '' && this.zddert && this.zddert != 'false') {
        this.$Toast('请填写报修科室');
        return;
      }
      this.addinfo.address = this.addinfo.address ? this.addinfo.address : '';
      if (this.addinfo.address.trim() == '' && this.zdaddress && this.zdaddress != 'false') {
        this.$Toast('请填写报修地址');
        return;
      }
      // if (this.addinfo.commitUserName.trim() == '') {
      // 	this.$Toast("请填写报修人姓名");
      // 	return
      // }
      this.addinfo.phoneNo = this.addinfo.phoneNo ? this.addinfo.phoneNo : '';
      if (this.addinfo.phoneNo.trim() == '' && this.zdtel && this.zdtel != 'false') {
        this.$Toast('请填写报修人电话');
        return;
      }
      // else if(this.addinfo.phoneNo && this.zdtel && this.zdtel!='false'){
      // 	console.log(this.addinfo.phoneNo)
      // 	console.log(this.reg)
      // 	console.log(this.reg.test(this.addinfo.phoneNo))
      // 	if (!this.reg.test(this.addinfo.phoneNo)) {
      // 		this.$Toast("请输入正确的手机号");
      // 		return false;
      // 	}
      // }
      if (this.addinfo.faultDescription.trim() == '') {
        this.$Toast('请填写故障描述');
        return;
      }
      // if (!this.reg.test(this.addinfo.phoneNo)) {
      // 	this.$Toast("请输入正确的手机号");
      // 	return false;
      // }

      if (!this.isclick1 && this.zddert && this.zddert != 'false') {
        this.$Toast('请点击选择报修科室');
        return false;
      }
      if (!this.isclick2 && this.zdtype && this.zdtype != 'false') {
        this.$Toast('请点击选择故障分类');
        return false;
      }
      this.addinfo.repairTypeId = 0;
      console.log(this.addinfo);
      if (type == 1) {
        this.addinfo.servicemanId = sessionStorage.getItem('uid');
        this.addinfo.self = true;
        this.increase();
      } else {
        if (type == 3) {
          this.addinfo.servicemanId = sessionStorage.getItem('uid');
          this.increase(type);
        } else {
          this.addinfo.self = false;
          if (this.addinfo.servicemanId) {
            this.increase();
          } else {
            var param = {
              id: this.addinfo.faultTypeId,
              deptId: this.addinfo.departId
            };
            var that = this;
            this.$http
              .post(this.$url + '/fault/type/jdugeCommander', this.$qs.stringify(param))
              .then(function (response) {
                if (response.data.code == '1410') {
                  that.$Toast(response.data.msg);
                  sessionStorage.setItem('token', '');
                  that.$router.push('/login');
                  return;
                }
                if (response.data.data) {
                  that.servicemanId = response.data.data.id;
                  that.addinfo.servicemanId = response.data.data.id;
                  var ztree = $.fn.zTree.getZTreeObj('treeDemo_u_index');
                  console.log(that.servicemanId);
                  var node = ztree.getNodesByParam('id', that.servicemanId);
                  console.log(node);
                  for (var i = 0; i < node.length; i++) {
                    if (!node[i].name) {
                      ztree.selectNode(node[i]);
                    }
                  }
                } else {
                  that.addinfo.servicemanId = '';
                }

                that.$http
                  .get(that.$url + '/sysSet/pcSkipArr')
                  .then(function (response) {
                    if (response.data.code == '1410') {
                      that.$Toast(response.data.msg);
                      sessionStorage.setItem('token', '');
                      that.$router.push('/login');
                      return;
                    }
                    if (response.data.data == 1) {
                      that.increase();
                    } else {
                      that.showSendOrder = true;
                      that.getengslist();
                    }
                  })
                  .catch(function (error) {
                    console.log(error);
                    // sessionStorage.setItem('token','undefined')
                    // that.$router.push('/login')

                    that.$Toast('网络拥堵，刷新一下');
                  });
              })
              .catch(function (error) {
                console.log(error);
                // sessionStorage.setItem('token','undefined')
                // that.$router.push('/login')

                that.$Toast('网络拥堵，刷新一下');
              });
          }
        }
      }

      this.showadd = false;
    },
    changechosea(id, name, phone) {
      this.userid = id;
      this.username = name;
      this.uphone = phone;
    },
    changechose(i) {
      this.$forceUpdate();
    },
    del() {
      var ids = [];
      for (var i = 0; i < this.fenlist.length; i++) {
        if (this.fenlist[i].chosesf == true) {
          ids = ids + '' + this.fenlist[i].id + ',';
        }
      }
      ids = ids.substring(0, ids.length - 1);
      if (ids.length == 0) {
        this.$Toast('暂无选中');
        return;
      }

      this.showloading = true;
      var param = {
        ids: ids
      };
      var that = this;
      this.$http
        .post(this.$url + '/tel/deleteTel', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          that.getfenlist();
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    unbindtel(i) {
      this.showloading = true;
      var that = this;
      var param = {
        id: this.fenlist[i].id
      };
      this.$http
        .post(this.$url + '/tel/deleteBindUser', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          that.getfenlist();
          that.$forceUpdate();
          // that.showloading = false
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    bindtel(i) {
      this.showloading = true;
      var that = this;
      var param = {
        id: this.fenlist[i].id
      };
      this.$http
        .post(this.$url + '/tel/bindUser', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          that.getfenlist();
          that.$forceUpdate();
          // that.showloading = false
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getfenlist() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/tel/getInfo')
        .then(function (response) {
          that.fenlist = response.data.data;
          for (var i = 0; i < that.fenlist.length; i++) {
            that.fenlist[i].chosesf = false;
          }
          that.showloading = false;
          that.getisPhoneGroup();
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getisPhoneGroup() {
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/isPhoneGroup')
        .then(function (response) {
          that.isPhoneGroup = response.data;
          that.getremoteIdarr();
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getteltype() {
      var that = this;
      this.$http
        .get(this.$url + '/telType')
        .then(function (response) {
          that.teltype = response.data.data;
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    openaddfen() {
      this.getteltype();
      this.getallerdai();
      this.equipnum = '';
      this.extension = '';
      this.addfen = true;
      console.log(this.addfen);
      this.$forceUpdate();
    },
    addtel() {
      // || this.extension ==''
      if (this.equipnum == '') {
        this.$Toast('请填写完整');
        return;
      }
      if (this.teltype == 2 && this.erdai == '') {
        this.$Toast('请填写完整');
        return;
      }
      this.showloading = true;
      var that = this;
      var param = {};
      if (this.teltype == 2) {
        param = {
          equipnum: this.equipnum,
          remoteId: this.remoteId,
          remark: this.extension,
          remoteEqu: this.erdai
        };
      } else {
        param = {
          equipnum: this.equipnum,
          remoteId: this.remoteId,
          remark: this.extension
        };
      }

      this.$http
        .post(this.$url + '/tel/addTelBindInFo', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.addfen = false;
          that.remoteId = '';
          // that.$forceUpdate()
          console.log(that.addfen);
          that.getfenlist();
          that.$forceUpdate();
          that.showloading = false;
          that.$Toast(response.data.msg);
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },

    hide(i) {
      this.helptype[i].show = !this.helptype[i].show;
      this.$forceUpdate();
    },
    gohelp(i, name, icon, index) {
      this.showzzc = false;
      this.help_show = false;
      // for (var i = 0; i < this.helptype.length; i++) {
      this.helptype[index].show = true;
      // }
      console.log(i);
      sessionStorage.setItem('rou', 20);
      this.active = sessionStorage.getItem('rou');
      this.$router.push('/help?id=' + i + '&name=' + name + '&icon=' + icon);
      // this.$router.push('/help/'+i+'/'+name+'/'+icon)
    },
    gettypeid() {
      var that = this;
      // on confirm
      this.$http
        .get(this.$url + '/help/helptype')
        .then(function (response) {
          that.helptype = response.data.data;
          for (var i = 0; i < that.helptype.length; i++) {
            that.helptype[i].show = true;
          }
          // console.log(that.helptype)
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    unbind() {
      this.showloading = true;
      var url = this.qywx
        ? this.$url + '/wecom/bind/unbondcurrent'
        : this.$url + '/bind/unbondcurrent';
      // alert(url)
      var that = this;
      // on confirm
      this.$http
        .get(url, {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          // console.log(response.data)
          that.showloading = false;
          that.showbind = false;
          that.showbind2 = false;
          that.$Toast(response.data.msg);
          // if (response.data.success) {
          // 	that.bind = false
          // }
          // setTimeout(function(){
          if (that.qywx) {
            that.getwxbind();
          } else {
            that.getbind();
          }
          // },1000)
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },

    binddingding() {
      var that = this;
      var data = {};
      var url = this.qywx ? this.$url + '/wecom/bind/account' : this.$url + '/bind/dingtalk';
      // alert(url)
      this.showloading = true;
      // console.log(sessionStorage.getItem('cookieid'))
      this.$http
        .get(url, {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          that.$Toast(response.data.msg);
          that.showloading = false;
          // alert("/wecom/bind/account----"+response.data.msg)
          that.showbind3 = false;
          that.showbind = false;
          if (response.data.success) {
            that.bind = true;
          }
          // setTimeout(function(){
          if (that.qywx) {
            that.getwxbind();
          } else {
            that.getbind();
          }
          // },1000)
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getwxbind() {
      var that = this;
      // alert(this.$url + '/wecom/bind/check')
      this.$http
        .get(this.$url + '/wecom/bind/check', {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          // alert('/wecom/bind/check--'+response.data)
          if (response.data == 'none') {
            that.$Toast('请使用企业微信打开');
          } else {
            that.bind = response.data;
          }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getbind() {
      var that = this;
      this.$http
        .get(this.$url + '/bind/check', {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          if (response.data == 'none') {
            that.$Toast('请使用钉钉打开');
          } else {
            that.bind = response.data;
          }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getwx() {
      var that = this;
      this.$http
        .get(this.$url + '/wecom/bind/alert', {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          // console.log('alert--'+response.data)
          // console.log('itemding--'+sessionStorage.getItem('ding'))

          if (sessionStorage.getItem('ding') == 'true') {
            that.getwxbind();
            if (response.data == true) {
              that.showbind = true;
            } else {
              that.showbind = false;
            }
          }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    getding() {
      var that = this;
      this.$http
        .get(this.$url + '/bind/alert', {
          headers: {
            cookieid: sessionStorage.getItem('cookieid')
          }
        })
        .then(function (response) {
          // console.log(sessionStorage.getItem('ding'))
          // console.log('alert--'+response.data)
          if (sessionStorage.getItem('ding') == 'true') {
            that.getbind();
            if (response.data == true) {
              that.showbind = true;
            } else {
              that.showbind = false;
            }
          }
        })
        .catch(function (error) {
          that.$Toast('网络拥堵，刷新一下');
          console.log(error);
        });
    },
    closepass() {
      this.oldpass = '';
      this.newpass = '';
      this.repass = '';
      this.alert_show_pass = false;
    },
    closealert() {
      this.getuid();
      this.options_show = false;
      this.alert_show_user = false;
    },
    selectit(index) {
      if (index == 'all') {
        this.dept = '全部';
        this.deptId = '';
      } else {
        this.dept = this.types[index].name;
        this.deptId = this.types[index].id;
      }
      this.options_show = false;
      this.showzzc2 = false;
    },
    // 获取部门
    gettype() {
      this.showloading = true;

      var that = this;
      this.$http
        .get(this.$url + '/sys/dept/select')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.types = response.data.data;
          that.showloading = false;
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    getuid() {
      // console.log(sessionStorage.getItem('token'))
      this.showloading = true;
      var that = this;
      this.$http
        .get(this.$url + '/sys/user/detail')
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          // console.log(response.data.data.realName)
          that.info = response.data.data;
          sessionStorage.setItem('uid', response.data.data.id);
          sessionStorage.setItem('userName', response.data.data.userName);
          sessionStorage.setItem('realName', response.data.data.realName);
          that.dept = response.data.data.departName;
          that.deptId = response.data.data.deptId;
          that.departName = response.data.data.departName;
          that.uname = response.data.data.realName;
          that.username = response.data.data.userName;

          that.getprower();
        })
        .catch(function (error) {
          console.log(error);
          that.getuid();
          that.$Toast('网络拥堵，刷新一下');
          // that.$router.push('/login')
        });
    },
    // 点击遮罩层
    close() {
      this.down_show = false;
      this.showzzc = false;
      this.help_show = false;
    },
    close2() {
      this.options_show = false;
      this.showzzc2 = false;
    },
    // 表单提交
    sure() {
      this.info.realName = this.info.realName.trim();
      if (this.info.realName == '') {
        this.$Toast('请填写真实姓名');
        return;
      }
      this.info.userName = this.info.userName.trim();
      if (this.info.userName == '') {
        this.$Toast('请填写账号');
        return;
      }

      this.info.phoneNo = this.info.phoneNo ? this.info.phoneNo.trim() : '';
      this.info.extTelNum = this.info.extTelNum ? this.info.extTelNum.trim() : '';
      if (this.info.phoneNo == '') {
        this.$Toast('请填写手机号');
        return;
      }
      if (!this.reg.test(this.info.phoneNo)) {
        this.$Toast('请输入正确的手机号');
        return false;
      }
      this.info.email = this.info.email ? this.info.email.trim() : '';
      // if (!/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(this.info.email)) {
      // 	this.$Toast("请输入正确的邮箱");
      // 	return false;
      // }
      if (this.deptId == '') {
        this.$Toast('请选择部门');
        return;
      }

      this.showloading = true;
      var that = this;
      var param = {
        id: this.info.id,
        realName: this.info.realName,
        userName: this.info.userName,
        deptId: this.deptId,
        sex: this.info.sex,
        email: this.info.email,
        phoneNo: this.info.phoneNo,
        extTelNum: this.info.extTelNum
      };
      this.$http
        .post(this.$url + '/sys/user/save', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          that.$Toast(response.data.msg);
          that.alert_show_user = false;
          that.getuid();
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    changepass() {
      this.oldpass = this.oldpass.trim();
      if (this.oldpass == '') {
        this.$Toast('请填写旧密码');
        return;
      }

      this.newpass = this.newpass.trim();
      if (this.newpass == '') {
        this.$Toast('请填写新密码');
        return;
      }

      this.repass = this.repass.trim();
      if (this.repass == '') {
        this.$Toast('请确认密码');
        return;
      }
      if (this.oldpass == this.newpass) {
        this.$Toast('新密码与旧密码一致');
        return;
      }
      if (this.repass != this.newpass) {
        this.$Toast('两次密码输入不一致');
        return;
      }

      var param = {
        userId: this.info.id,
        oldPassword: this.oldpass,
        newPassword: this.newpass,
        verify: this.repass
      };
      var that = this;
      this.$http
        .post(this.$url + '/sys/user/savepwd', this.$qs.stringify(param))
        .then(function (response) {
          if (response.data.code == '1410') {
            that.$Toast(response.data.msg);
            sessionStorage.setItem('token', '');
            that.$router.push('/login');
            return;
          }
          if (response.data.success == true) {
            that.$Toast(response.data.msg);
            that.alert_show_pass = false;
            that.oldpass = '';
            that.newpass = '';
            that.repass = '';
          } else {
            that.showloading = false;
            that.$Toast(response.data.msg);
          }
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    outlogin() {
      var that = this;
      this.$http
        .post(this.$url + '/logout')
        .then(function (response) {
          if (response.data.success) {
            sessionStorage.setItem('token', 'undefined');
            sessionStorage.setItem('rou', 1);
            sessionStorage.setItem('permissions', []);
            sessionStorage.setItem('userName', '');
            sessionStorage.setItem('realName', '');
            that.$router.push('/login');
          }
          that.$Toast(response.data.msg);
        })
        .catch(function (error) {
          console.log(error);
          that.$Toast('网络拥堵，刷新一下');
        });
    },
    flushCom: function () {
      // 　　　this.$router.go(0);
    },
    goit(i) {
      sessionStorage.setItem('rou', i);
      this.active = sessionStorage.getItem('rou');

      if (this.active == 1) {
        this.$router.push('/list');
      } else if (this.active == 2) {
      } else if (this.active == 4) {
        this.$router.push('/internet');
      } else if (this.active == 5) {
      } else if (this.active == 3) {
      } else if (this.active == 6) {
      } else if (this.active == 7) {
      }
    }
  },

  computed: {}
};
</script>
<style lang="less" scoped>
.jd_left {
  white-space: nowrap;
}

.jdmodel {
  background-color: #f3f3f3;
  border-radius: 5px;
  padding: 10px 15px;
  color: #32b16c;
  margin-top: 20px;
}

.jd_right {
  color: #4286f5;
}

.jdphone {
  display: flex;
  margin: 20px 0;
  color: #4286f5;
}

.jdphone img {
  width: 30px;
}

.jdtop {
  font-size: 15px;
  margin-bottom: 10px;
  margin-left: -20px;
}

.jdblo span,
.jdtop span {
  color: #4286f5;
  /* font-size: 16px; */
  /* font-weight: bold; */
  margin: 0 5px;
}

.jdlist {
  padding-left: 30px;
  height: 240px;
  overflow-y: auto;
}

.jdli {
  display: flex;
  margin-bottom: 5px;
  font-size: 14px;
}

/deep/ .jd .el-dialog {
  margin-top: calc(100vh - 450px) !important;
  margin-bottom: 0;
}

/deep/ .jd .el-dialog__header {
  background-color: #4286f5;
  padding: 20px;
}

/deep/ .jd .el-dialog__title {
  color: #fff !important;
}

/deep/ .jd .el-dialog__headerbtn .el-dialog__close {
  color: #fff !important;
}

.empty {
  padding: 20px 20px 10px;
  color: #ccc;
}

.albjbox {
  height: 419px;
  overflow-x: hidden;
  overflow-y: scroll;
}

.glist {
  display: flex;
  flex-wrap: wrap;
  padding: 5px 10px;
}

.gli img {
  width: 14px;
  height: 14px;
  margin-right: 5px;
}

.gli {
  display: flex;
  min-width: 33%;
  display: flex;
  align-items: center;
  height: 40px;
}

.gtitle {
  text-align: left;
  font-size: 14px;
  margin-right: 20px;
  /* min-width: 80px; */
}

.gname {
  text-align: left;
  display: flex;
  align-items: center;
  margin-top: 20px;
  background: rgba(66, 134, 245, 0.15);
  height: 50px;
  padding-left: 10px;
  color: #4286f5;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.gname img {
  width: 16px;
  margin-right: 10px;
  transition: all 0.3s;
}

.bj_alert {
  width: 800px;
  height: 600px;
}

.albjbox {
  padding: 0 20px 20px;
}

.bjtabli {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}

.bjtab {
  display: flex;
  justify-content: space-between;
  height: 50px;
  border-bottom: 1px solid #ddd;
}

.btn-red2 {
  background: orangered;
  border: none;
  color: #fff;
}

.addclass {
  height: calc(75vh - 243px);
  overflow-x: hidden;
  overflow-y: scroll;
}

.time_line_text .gre {
  color: #32b16c;
}

.time_line_text {
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #626262;
}

.time_line_tip {
  width: 64px;
  height: 20px;
  background: #ffffff;
  border: 1px solid #32b16c;
  border-radius: 3px;
  font-size: 12px;
  font-family: SimSun;
  font-weight: 400;
  color: #32b16c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time_line_li {
  display: flex;
  min-height: 87px;
}

.time_line_cur {
  width: 9px;
  height: 9px;
  background: #32b16c;
  border-radius: 50%;
  margin-left: 14px;
  margin-right: 17px;
  position: relative;
  top: 4px;
}

.time_line_time {
  width: 96px;
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #999999;
  text-align: right;
  line-height: 18px;
}

.time_line_line {
  width: 1px;
  background: #32b16c;
  position: absolute;
  height: 100%;
  left: 113px;
  top: 5px;
}

.time_line {
  position: relative;
}

.check_alert_right .Scont {
  height: 100%;
}

.time_line_box {
  width: 100%;
  max-height: calc(100% - 112px);
  background: #f6f6f6;
  border: 1px solid #ddd;
  margin-top: 15px;
  position: relative;
  padding: 38px 48px;
  overflow-y: scroll;
}

.time_line_box {
  -ms-overflow-style: none !important;
}

.time_line_box::-webkit-scrollbar {
  display: none;
}

.phras_box {
  display: flex;
  flex-wrap: wrap;
}

.phrase_li {
  background: #abbac3;
  padding: 0 15px;
  height: 34px;
  border-radius: 34px;
  color: #fff;
  line-height: 34px;
  font-size: 14px;
  display: inline-block;
  cursor: pointer;
  margin: 10px;
}

.order_tab_act {
  background: #eff4fc !important;
  border: 1px solid #4286f5 !important;
}

.order_tab {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.order_tab .res_text {
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0;
}

.order_tab1 {
  padding: 0 20px;
  height: 38px;
  background: #f6f6f6;
  border: 1px solid #f6f6f6;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 15px;
}

.order_tab1 img {
  width: 17px;
  margin-right: 5px;
}

.stopbtn img {
  margin-right: 7px;
}

.stopbtn {
  width: 135px;
  height: 34px;
  background: #4286f5;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #ffffff;
  cursor: pointer;
  margin-bottom: 50px;
}

.stop_btn {
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.res .input-cont {
  width: calc(100% - 90px);
}

.res textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 14px;
  outline: none;
  line-height: 20px;
  height: 80px;
  position: relative;
  top: 6px;
}

.res .check_li_l {
  text-align: right;
  width: 96px;
  padding-left: 29px;
  white-space: nowrap;
}

.res .radio {
  display: flex;
}

.res .radio div {
  min-width: 100px;
}

.res .radio .res_text {
  padding-left: 0;
}

.check_li_l span {
  color: #ec6941;
}

.time_tip {
  /* width: 301px; */
  padding: 0 7px;
  height: 20px;
  background: #f1f9f1;
  border: 1px solid #32b16c;
  border-radius: 3px;
  font-size: 12px;
  font-family: SimSun;
  font-weight: 400;
  color: #32b16c;
  line-height: 18px;
}

.lc_text {
  width: 58px;
  display: flex;
  justify-content: center;
}

.lc_kong {
  height: 7px;
  background: #ddd;
  width: 19%;
  position: relative;
  bottom: 15px;
}

.lc_2 {
  width: 58px;
  height: 58px;
  border-radius: 100%;
  border: 6px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #626262;
}

.lc_kong_ban {
  height: 7px;
  background: #ddd;
  width: 9.5%;
  position: relative;
  bottom: 15px;
}

.lc_heng_ban {
  height: 7px;
  background: #32b16c;
  width: 9.5%;
  position: relative;
  bottom: 15px;
}

.lc_heng {
  height: 7px;
  background: #32b16c;
  width: 19%;
  position: relative;
  bottom: 15px;
}

.lc_1 {
  width: 58px;
  height: 58px;
  border-radius: 100%;
  background: #32b16c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #ffffff;
}

.lc {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 55px 85px;
  font-size: 18px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #626262;
  white-space: nowrap;
}

.tip_fw {
  width: 64px;
  height: 20px;
  background: #e0f0e0;
  border-radius: 3px;
  font-size: 12px;
  color: #32b16c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip_nomorl {
  width: 64px;
  height: 20px;
  background: #ffffff;
  border: 1px solid #ec6941;
  border-radius: 3px;
  font-size: 12px;
  font-family: SimSun;
  font-weight: 400;
  color: #ec6941;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check_alert_right tr td:nth-of-type(2) {
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #000000;
}

.check_alert_right tr td:nth-of-type(1) {
  width: 129px;
  text-align: right;
  background: #f6f6f6;
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #888888;
}

.check_alert_right table {
  margin-top: 16px;
  width: 100%;
}

.check_alert_right table td {
  border: 1px solid #eee;
}

.green_cor {
  color: #32b16c;
}

.green_bg {
  background-color: #f1f9f1;
  border-radius: 6px;
  color: #32b16c;
}

.stop_box .check_list {
  min-height: calc(100vh - 600px);
}

.check_list {
  margin-bottom: 25px;
}

.org_cor {
  color: #ec6941;
}

.org_bg {
  background-color: #fbf5f1;
  border-radius: 6px;
  color: #ec6941;
}

.check_li_r {
  width: calc(100% - 90px);
  padding: 0 6px;
  line-height: 34px;
  word-break: break-all;
}

.check_li_r div {
  word-break: break-all;
}

.check_li_l {
  margin-right: 20px;
  /* height: 43px;
		line-height: 43px; */
  min-width: 70px;
  line-height: 34px;
  height: 34px;
  white-space: nowrap;
}

.check_lis {
  display: flex;
  padding-left: 15px;
  font-size: 14px;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: #000000;
  margin-top: 10px;
}

.tip_check img {
  margin-right: 3px;
}

.check_alert_left .tit {
  display: flex;
  align-items: center;
}

h3 .tip_check {
  width: 81px;
  height: 20px;
  background: #ffffff;
  border: 1px solid #ec6941;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ed724d;
  margin-left: 14px;
}

.check_box {
  width: 100%;
}

.check_alert_right {
  width: 31%;
}

.check_alert_left {
  width: 64%;
  /* height: 100%; */
}

.check_alert_box {
  display: flex;
  /* align-items: center; */
  justify-content: space-between;
  padding: 22px 19px;
  /* min-height: calc(100% - 150px); */
}

.biaoq {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.numslen {
  position: absolute;
  bottom: 0px;
  right: 50px;
  font-size: 12px;
}

.phone_icon {
  width: 18px;
  /* margin-right: 3px; */
}

.send_search {
  width: 252px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #cccccc;
  /* box-shadow: 0px 2px 0px 0px #EEEEEE; */
  border-radius: 5px;
  padding: 0 12px;
  outline: none;
}

.sendOrder_left_title {
  font-size: 14px;
  margin-bottom: 11px;
  color: #4286f5;
}

.sendOrder_right {
  width: calc(100% - 320px);
  padding: 27px 30px;
}

.sendOrder_left {
  width: 320px;
  height: calc(100% - 48px);
  border-right: 1px solid #ddd;
  padding: 23px 34px;

  height: calc(100% - 55px);
  overflow-y: scroll;
}

.sendOrder_left {
  -ms-overflow-style: none !important;
}

.send_order_btn2 {
  color: #434343;
  font-size: 14px;
  background: #eeeeee;
  margin-right: 18px;
}

.send_order_btn {
  color: #fff;
  font-size: 14px;
  background: #4286f5;
  margin-right: 18px;
}

.send_order_btn img,
.send_order_btn2 img {
  margin-right: 10px;
}

.send_order_btn,
.send_order_btn2 {
  width: 105px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
}

.order_right_index {
  height: calc(100% - 108px);
  overflow-y: scroll;
  padding-bottom: 20px;
}

.order_right_index {
  -ms-overflow-style: none !important;
}

.order_right_index::-webkit-scrollbar {
  display: none;
}

.order_right_btns {
  height: 80px;
  border-top: #ddd 1px solid;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sendOrder_left::-webkit-scrollbar {
  display: none;
}

.send_order_alert {
  display: flex;
  padding: 0 !important;
  overflow-y: hidden !important;
}

.el-autocomplete-suggestion li.highlighted,
.el-autocomplete-suggestion li:hover {
  background-color: #ddd;
}

.el-popper {
  margin-top: 0;
}

.my-autocomplete {
  border-radius: 0 0 6px 6px;
  min-width: 400px;
  margin-top: 0 !important;
}

.popper__arrow {
  display: none;
}

/deep/ .el-scrollbar__wrap {
  padding: 0 !important;
  overflow-x: scroll;
  -ms-overflow-style: none !important;
}

.el-autocomplete-suggestion__wrap {
  padding: 0 !important;
}

.el-autocomplete-suggestion li {
  padding: 0 0 !important;
  min-width: 320px;
}

.el-scrollbar__wrap::-webkit-scrollbar {
  display: none;
}

.el-scrollbar__wrap li:nth-of-type(1) .tab_tr {
  border-top: 1px solid #ddd;
  background-color: #ddd;
}

td,
th {
  font-size: 14px;
  color: #333;
  /* line-height: 22px; */
  padding: 10px;
  border-top: 0;
  border-bottom: 1px solid #eee;
}

.tab_tr {
  height: 40px;
  border-bottom: 1px solid #ddd;
  line-height: 40px;
  /* display: flex; */
}

.tab_td {
  width: 25%;
  min-width: 80px;
  display: inline-block;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addaler .radio {
  display: flex;
  align-items: center;
  color: #000;
  margin-bottom: 5px;
  height: 34px;
}

.addaler .radio span {
  cursor: pointer;
  font-weight: normal !important;
}

.addaler .radio label {
  font-weight: normal !important;
}

.addaler label {
  font-weight: normal !important;
}

.addaler .radio div {
  display: flex;
  align-items: center;
  margin-right: 26px;
}

.left_li_act .tel_time,
.left_li_act .tel_title {
  color: #0075ff;
}

.left_li {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  cursor: pointer;
}

.tel_time {
  font-size: 12px;
  white-space: nowrap;
}

.tel_title {
  color: #333;
  font-size: 14px;
}

.add_left_box {
  padding: 0 20px;
  height: calc(100vh - 255px);
  overflow-y: scroll;
  overflow-x: hidden;
  margin-bottom: 30px;
}

.add_left {
  width: 182px;
}

.buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 38px;
}

.closebtn {
  width: 89px;
  height: 34px;
  background: #eeeeee;
  border-radius: 6px;
  font-size: 14px;
  color: #434343;
  text-align: center;
  line-height: 34px;
  cursor: pointer;
}

.sure {
  width: 89px;
  height: 34px;
  line-height: 34px;
  background: #4286f5;
  border-radius: 6px;
  font-size: 14px;
  color: #ffffff;
  margin-right: 18px;
  text-align: center;
  cursor: pointer;
}

.tanbox {
  -ms-overflow-style: none !important;
}

.tanbox::-webkit-scrollbar {
  display: none;
}

.tanbox {
  overflow-x: hidden;
  overflow-y: scroll;
  height: 415px;
}

.tan_zhu {
  margin-top: 45px;
  font-size: 14px;
  color: #666666;
  line-height: 24px;
}

.tan_btn2 {
  width: 82px;
  height: 30px;
  background: #ffffff;
  border: 1px solid #888888;
  border-radius: 6px;
  font-size: 14px;
  color: #555555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tan_btn2 img {
  width: 16px;
  margin-right: 7px;
}

.tan_btn1 img {
  width: 18px;
  margin-right: 4px;
}

.tan_btn1 {
  width: 115px;
  height: 30px;
  background: #ffffff;
  border: 1px solid #32b16c;
  border-radius: 6px;
  font-size: 14px;
  color: #32b16c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  cursor: pointer;
}

.tan_btns {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.tan_bind2 {
  width: 60px;
  height: 28px;
  background: #fff;
  border-radius: 5px;
  font-size: 14px;
  color: #888888;
  text-align: center;
  line-height: 28px;
  cursor: pointer;
  border: 1px solid #888888;
  margin-left: 10px;
}

.tan_bind {
  width: 60px;
  height: 28px;
  background: #32b16c;
  border-radius: 5px;
  font-size: 14px;
  color: #ffffff;
  text-align: center;
  line-height: 28px;
  cursor: pointer;
}

.tan_info {
  font-size: 14px;
  color: #888888;
  line-height: 32px;
}

.tan_title {
  font-size: 18px;
  line-height: 26px;
  color: #4286f5;
}

.tan_main {
  margin-left: 16px;
}

.tan_li_box {
  display: flex;
  justify-content: space-between;
  width: 800px;
  align-items: center;
}

.tan_li {
  display: flex;
  border-bottom: 1px solid #d9d9d9;
  justify-content: space-between;
  /* height: 89px; */
  padding: 17px 0 13px;
}

/deep/ .el-checkbox__inner::after {
  border: 2px solid #fff;
  height: 10px;
  left: 6px;
  top: 2px;
  width: 7px;
  border-left: 0;
  border-top: 0;
}

/deep/ .el-checkbox__inner {
  width: 22px;
  height: 22px;
}

.tanopen {
  width: 28px;
  height: 28px;
  margin-right: 15px;
}

.helpli:hover {
  background: #4286f5;
  color: #fff;
}

.helpli div {
  width: 52px;
  white-space: nowrap;
}

.helpli {
  width: 133px;
  height: 42px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 17px;
  font-size: 13px;
  color: #4286f5;
}

.helpli img {
  margin-right: 12px;
  width: 28px;
  height: 28px;
}

.helpdown {
  background: url(../assets/images/helpbg.png) no-repeat;
  background-size: 100% 100%;
  width: 200px;
  /* height: 300px; */
  position: absolute;
  z-index: 4002;
  top: 28px;
  right: 25px;
  padding: 39px 0;
}

.help {
  width: 28px;
  height: 28px;
  margin-right: 15px;
}

.user {
  display: flex;
}

.iconbox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hideshow .icon1 {
  display: none;
}

.hideshow:hover .icon1 {
  display: block;
}

.hideshow:hover .icon2 {
  display: none;
}

.iconimg {
  width: 25px;
  display: block;
  margin-bottom: 5px;
}

.alzzc {
  z-index: 40000;
}

.dingimg {
  width: 20px;
}

.closebind {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 20px;
  right: 20px;
}

.binbtn {
  color: #fff;
  background-color: #0075ff;
  text-align: center;
  height: 50px;
  line-height: 50px;
  border-radius: 5px;
  font-size: 16px;
  width: 60%;
  cursor: pointer;
  margin: 30px auto;
}

.bindtop_left {
  text-align: center;
  color: #000;
  font-size: 16px;
}

.bindtop_left img {
  width: 80px;
  margin-bottom: 10px;
}

.albind_top {
  display: flex;
  justify-content: space-around;
  padding: 0 50px;
}

.bindalert {
  background: #fff;
  border-radius: 5px;
  width: 500px;
  height: 300px;
  padding: 60px 0;
  position: relative;
}

.logo {
  /* font-family: MicrosoftYaHei-, MicrosoftYaHei; */
  font-family: 微软雅黑;
  font-weight: 550;
}
.titlelogo {
  height: 10px;
}
.titlename {
}
.line_title span {
  color: red;
}

.zzc {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 4;
  top: 0;
  left: 0;
}

.modal-content {
  overflow: visible;
}

input[type='radio'] {
  opacity: 0;
  position: absolute;
  z-index: -2;
}

input[type='radio'] + label {
  width: 13px;
  height: 13px;
  min-height: 13px;
  padding: 1.5px;
  border: 1px solid #4f4f4f;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  box-sizing: border-box;
  margin-right: 7px;
}

input[type='radio'] + label::before {
  content: '';
  border-radius: 1.4rem;
  width: 7px;
  height: 7px;
  /* margin-top: 2.5px;
		margin-left: 1px;
		display: flex; */
  display: block;
  margin-bottom: 0;
  box-sizing: border-box;
  /* justify-content: center; */
  /* align-items: center; */
}

input[type='radio']:checked + label {
  border: 1px solid #0075ff;
  box-sizing: border-box;
}

input[type='radio']:checked + label::before {
  background: #0075ff;
}

.w600 {
  margin: calc(50vh - 275px) auto;
}

.line_title {
  width: 80px;
  text-align: right;
}

.radio div {
  display: flex;
  align-items: center;
  color: #000;
  margin-right: 50px;
  cursor: pointer;
}

.line_title {
  font-size: 14px;
  color: #000000;
  line-height: 34px;
}

.w600 .modal-body.h100 {
  height: 410px;
  overflow-y: visible;
}

.line .radio {
  width: 360px;
  display: flex;
}

.line {
  display: flex;
  margin-top: 19px;
  justify-content: center;
}

.modal-header.tit {
  font-size: 20px;
  color: #000;
  font-weight: normal;
}

.body {
  /* overflow: hidden; */
  height: 100vh !important;
  width: 100vw;
  position: fixed;
  top: 0;
}

.user .dropdown-menu {
  left: auto;
}
.titlesec {
  font-size: 16px;
}
</style>
